I hereby claim:
- I am n8kowald on github.
- I am n8kowald (https://keybase.io/n8kowald) on keybase.
- I have a public key ASBo4VQ3KwN5Xys75sMXV2ez3KFlkEXdUCT7IjlzZMxYbAo
To claim this, I am signing this object:
# GIT WORKFLOW | |
# (c) Luke Maciak | |
# Initialize: | |
git init | |
# Check Out: | |
git clone username@host:/path/to/repository | |
# Add Origin: |
--SQL REPLACING | |
UPDATE mdl_message SET message = REPLACE(message, "target_view.phpcourse", "target_view.php?course") WHERE message LIKE('%target_view.phpcourse%'); | |
--SQL Backup and Restore | |
--BACKUP | |
mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql | |
--RESTORE | |
mysql -u root -p[root_password] [database_name] < dumpfilename.sql | |
--CREATE TABLE |
--- Show numerical permissions --- | |
ls -l | awk '{k=0;for(i=0;i<=8;i++)k+=((substr($1,i+2,1)~/[rwx]/) \ *2^(8-i));if(k)printf("%0o ",k);print}' | |
OR THIS | |
find . -printf "%m:%f\n" | |
********* .bashrc ********* | |
# Remove CVS directories | |
alias purgecvs='find . -name CVS -prune -exec rm -rf {} \;' |
$ch = curl_init('http://path/to/sanfrancisco/'); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
$output = curl_exec($ch); | |
$info = curl_getinfo($ch); | |
$info will return an array including elements for | |
total_time, | |
namelookup_time, | |
connect_time, | |
pretransfer_time, |
/* RULES */ | |
- Variable and function declarations are hoisted (names are moved to the top of their current scope) by the JavaScript interpreter. | |
- Variable initialisations are not moved. | |
- Only functions create new scope | |
- Function Declarations are officially prohibited within non-function blocks (such as if) | |
var a; // variable declaration | |
a = 1; // variable initialisation |
# Compress text, html, javascript, css, xml: | |
<IfModule mod_deflate.c> | |
AddOutputFilterByType DEFLATE text/text | |
AddOutputFilterByType DEFLATE text/plain | |
AddOutputFilterByType DEFLATE text/html | |
AddOutputFilterByType DEFLATE text/xml | |
AddOutputFilterByType DEFLATE text/css | |
AddOutputFilterByType DEFLATE text/javascript | |
AddOutputFilterByType DEFLATE application/xml | |
AddOutputFilterByType DEFLATE application/xhtml+xml |
#!/bin/bash | |
# scp-speed-test.sh | |
# Author: Alec Jacobson alecjacobsonATgmailDOTcom | |
# | |
# Test ssh connection speed by uploading and then downloading a 10000kB test | |
# file (optionally user-specified size) | |
# | |
# Usage: | |
# ./scp-speed-test.sh user@hostname [test file size in kBs] | |
# |
# This is a simple example Widget, written in CoffeeScript, to get you started | |
# with Übersicht. For the full documentation please visit: | |
# | |
# https://github.com/felixhageloh/uebersicht | |
# | |
# You can modify this widget as you see fit, or simply delete this file to | |
# remove it. | |
# this is the shell command that gets executed every time this widget refreshes | |
command: "echo $(whoami) && TZ=Australia/Adelaide date && TZ=Australia/Melbourne date" |
#!/bin/bash | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
# Author: J. Le Coupanec | |
# Date: 2014/11/04 |
I hereby claim:
To claim this, I am signing this object: