rubenrubiob
rubenrubiob
Programming and system resources
110 posts
Useful electronic resources for programming, systems and others
Don't wanna be here? Send us removal request.
rubenrubiob · 9 years ago
Link
2 notes · View notes
rubenrubiob · 9 years ago
Link
2 notes · View notes
rubenrubiob · 10 years ago
Text
VMware ESXi: add cronjobs
cp /var/spool/cron/crontabs/root /var/spool/cron/crontabs/root.backup
chmod 644 /var/spool/cron/crontabs/root.backup
vi /var/spool/cron/crontabs/root.backup
Add your cron line to the file
chmod 444 /var/spool/cron/crontabs/root.backup
mv /var/spool/cron/crontabs/root.backup /var/spool/cron/crontabs/root
kill $(cat /var/run/crond.pid)
crond
vi /etc/rc.local.d/local.sh and add the following content:
/bin/kill $(cat /var/run/crond.pid)
/bin/echo "your cron line here" >> /var/spool/cron/crontabs/root
crond
2 notes · View notes
rubenrubiob · 10 years ago
Text
Windows XP: start remote desktop on boot
Create a remote desktop connection (Start --> Accesories --> Remote Desktop Connection1) with settings of your desire, and save it some place, e.g., C:\remote.rdp
Create a vbs with the following content:
Set shell = CreateObject("WScript.Shell") '* Create the script object
shell.Run "mstsc.exe /multimon c:remote.rdp", 1, True '* Execute the remote file save in the previous step
shell.Run "shutdown -t 0 -s -f" '* Shut down the computer when logging off
Save the file wherever you want, e.g., C:\remote.vbs
Now, let's change the default Windows shell; start Windows Group Policy Editor: Start --> Run2
Type: gpedit.msc
Edit the properties following policy using a right-click: User Configuration --> Admin Templates --> System --> Custom User Interface3
Enable the policy and type the following as the name of the file: cscript c:remote.vbs
Save the changes and restart the computer. It should boot straight to the remote connection.
If you ever want to edit anything within the local computer, you can do it starting in failing mode, pressing F8 on boot.
References: - http://serverfault.com/questions/339562/remote-desktop-auto-start-session-on-workstation-login - https://support.microsoft.com/en-us/kb/307882#bookmark-3 - http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/shutdown.mspx?mfr=true - http://stackoverflow.com/questions/162304/how-do-i-shutdown-restart-logoff-windows-via-bat-file
In Spanish, Inicio --> Todos los programas --> Accesorios --> Conexión a Escritorio remoto. ↩︎
In Spanish, Inicio --> Ejecutar ↩︎
In Spanish, Configuración de usuario --> Plantillas administrativas --> Sistema --> Interfaz de usuario personalizada ↩︎
0 notes
rubenrubiob · 10 years ago
Link
0 notes
rubenrubiob · 10 years ago
Text
Create a new git repository from a subfolder of an existing git repository
Clone the existing project into a new folder:
git clone [email protected]:user/project-name.git new-project-name
Change directory to the just cloned repository
cd new-project-name
Now it comes the magic, with the subdirectory-filter command:
git filter-branch --prune-empty --subdirectory-filter desired-folder master
Remove the origin and add the new one that must be created before:
git remote rm origin
git remote add origin [email protected]:user/new-project-name.git
git push origin master
0 notes
rubenrubiob · 10 years ago
Text
Supress PHP warnings in htaccess
# supress php errors php_flag display_startup_errors off php_flag display_errors off php_flag html_errors off php_value docref_root 0 php_value docref_ext 0
0 notes
rubenrubiob · 10 years ago
Text
Replace within files in command line
sed -i 's/word-to-replace/word-to-replace-for/g' *.txt
1 note · View note
rubenrubiob · 10 years ago
Text
Redirect to https if request is https
RewriteCond %{HTTP_HOST} ^sub.domain.com$ [NC]RewriteCond %{HTTPS} off [OR] RewriteCond %{HTTPS}:s on:(s) RewriteRule ^ http%1://sub.domain.com:2368%{REQUEST_URI} [P,QSA,L]
0 notes
rubenrubiob · 10 years ago
Link
Learn Apache mod_rewrite
0 notes
rubenrubiob · 10 years ago
Link
0 notes
rubenrubiob · 11 years ago
Link
Apaxy - A simple, customisable theme for your Apache directory listing.
0 notes
rubenrubiob · 11 years ago
Link
A collection of useful .htaccess snippets.
0 notes
rubenrubiob · 11 years ago
Link
0 notes
rubenrubiob · 11 years ago
Link
In this post I present a Git branching strategy for developing and releasing software as I’ve used it in many of my projects, and which has turned out to be very successful.
0 notes
rubenrubiob · 11 years ago
Link
We’ve been using Subversion for DoneDone’s source code hosting since 2009, and it’s served us well over the years. Lately, though, our coworkers at We Are Mammoth and Kin have been using Git (and GitHub) with…
0 notes
rubenrubiob · 11 years ago
Link
Perfect PHP url validation
0 notes