find /var/www/html -type f -iname "*" -print0 | xargs -I {} -0 chmod 0444 {}
find /var/www/html -type d -iname "*" -print0 | xargs -I {} -0 chmod 0544 {}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Add this to your functions.php | |
| // Discourage wordpress plugin updates | |
| function no_plugin_updates($value) { | |
| unset($value->response[ plugin_basename('pluginfolder/pluginfile.php') ]); | |
| return $value; | |
| } | |
| add_filter('site_transient_update_plugins', 'no_plugin_updates'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| auto eth0 | |
| iface eth0 inet static | |
| address <your-vm-ip-address> | |
| netmask <your-netmask(ex:255.255.255.255)> | |
| broadcast <your-vm-ip-address> | |
| post-up route add <your-server-getaway-ip(ex: usually ends with .1)> dev eth0 | |
| post-up route add default gw <your-server-getaway-ip(ex: usually ends with .1)> | |
| post-down route del <your-server-getaway-ip(ex: usually ends with .1)> dev eth0 | |
| post-down route del default gw <your-server-getaway-ip(ex: usually ends with .1)> | |
| dns-nameservers 8.8.8.8 8.8.4.4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # encoding: utf-8 | |
| ## | |
| # Backup Generated: app_backup | |
| # Once configured, you can run the backup with the following command: | |
| # | |
| # $ backup perform -t app_backup [-c <path_to_configuration_file>] | |
| # | |
| # For more information about Backup's components, see the documentation at: | |
| # http://backup.github.io/backup |
I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace :db do | |
| def detect_env | |
| ENV['RAILS_ENV'] || 'development' | |
| end | |
| def truncate(table) | |
| begin | |
| case @config["adapter"] | |
| when "mysql", "mysql2" | |
| ActiveRecord::Base.connection.execute("TRUNCATE #{table}") | |
| puts "Table #{table} truncated!" |
I hereby claim:
- I am keeross on github.
- I am keeross (https://keybase.io/keeross) on keybase.
- I have a public key whose fingerprint is 7C5E A2EB 82EB C279 D15D 8822 3320 06B9 7A7C DBD0
To claim this, I am signing this object:
The solution is simple. Just include the following snippet in your ~/.bashrc (or ~/.bash_profile) and reload your shell environment with source ~/.bashrc. This snippet will create a shell function that will override the builtin command cd with a customized one that scans the entered directory, and every other above, for a file named .gopath.
cd () {
builtin cd "$@"
cdir=$PWD
while [ "$cdir" != "/" ]; do
if [ -e "$cdir/.gopath" ]; then
export GOPATH=$cdir #or GOPATH=$GOPATH:$cdir if you want to keep original $GOPATH
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| image: node:latest | |
| cache: | |
| paths: | |
| - node_modules/ | |
| before_script: | |
| - apt-get update -y | |
| - apt-get install rsync openssh-client -y | |
| - npm install |
OlderNewer