start new:
tmux
start new with session name:
tmux new -s myname
<?php | |
// have to add that opening tag to get syntax highlighting... ¯\_(ツ)_/¯ | |
/** | |
* Prevent update notification for plugin | |
* http://www.thecreativedev.com/disable-updates-for-specific-plugin-in-wordpress/ | |
* Place in theme functions.php or at bottom of wp-config.php | |
*/ | |
function disable_plugin_updates( $value ) { |
wrap any function in | |
javascript: (function () { | |
// javascript goes here | |
})(); | |
minify and then create a bookmark with the URL as the minified JavaScript | |
// grayscale all images without an alt tag | |
const css = document.createElement("style"); |
javascript:(function(){ | |
var w=window, | |
d=document, | |
pageSelectedTxt=w.getSelection?w.getSelection():(d.getSelection)?d.getSelection():(d.selection?d.selection.createRange().text:0), | |
pageTitle=d.title, | |
pageUri=w.location.href, | |
tmplt=""; | |
tmplt="["+pageTitle+"]("+pageUri+")\n\n"; | |
if(pageSelectedTxt!="") { | |
pageSelectedTxt=">%20"+pageSelectedTxt; |
mkdir -p ~/Sites | |
mkdir -p ~/Sites/logs | |
mkdir -p ~/Sites/conf | |
mkdir -p ~/Sites/conf/vhosts | |
touch ~/Sites/conf/httpd-vhosts.conf | |
export USERDIR=`whoami` | |
cat >> ~/Sites/conf/httpd-vhosts.conf <<EOF | |
# | |
# Use name-based virtual hosting. | |
# |
#!/bin/sh | |
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".jsx\{0,1\}$" | grep 'xometry_webapp/src/js') | |
ESLINT="$(git rev-parse --show-toplevel)/xometry_webapp/node_modules/.bin/eslint" | |
if [[ "$STAGED_FILES" = "" ]]; then | |
exit 0 | |
fi | |
PASS=true |
cd ~ | |
sudo yum update | |
sudo yum install java-1.7.0-openjdk.x86_64 -y | |
sudo yum install wget | |
wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.7.2.tar.gz -O elasticsearch.tar.gz | |
tar -xf elasticsearch.tar.gz | |
rm elasticsearch.tar.gz | |
mv elasticsearch-* elasticsearch |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
after "deploy", "deploy:cleanup" | |
after "deploy:update_code", "composer:install" | |
before "composer:install", "composer:copy_vendors" | |
after "composer:install", "phpunit:run_tests" | |
namespace :composer do | |
desc "Copy vendors from previous release" | |
task :copy_vendors, :except => { :no_release => true } do | |
run "if [ -d #{previous_release}/vendor ]; then cp -a #{previous_release}/vendor #{latest_release}/vendor; fi" | |
end |
#!/usr/bin/env bash | |
apt-get -y update | |
apt-get -y install build-essential zlib1g-dev libssl-dev libyaml-dev | |
cd /tmp | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz | |
tar -xvzf ruby-1.9.3-p125.tar.gz | |
cd ruby-1.9.3-p125/ | |
./configure --prefix=/usr/local | |
make | |
make install |