- Great match and replace tester.
- Haven't used this one much but it looks nice.
- This resource has online RegEx testers for many languages
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns | |
Compress 1K bytes with Zippy 3,000 ns | |
Send 2K bytes over 1 Gbps network 20,000 ns | |
Read 1 MB sequentially from memory 250,000 ns | |
Round trip within same datacenter 500,000 ns | |
Disk seek 10,000,000 ns |
😱 Seriously? | |
😷 That's a bad look. | |
Burn it to the ground! 🔥 | |
😠 Torvalds frowns at you. | |
🚶 Have you considered another career? | |
You must hate your coworkers. 👹 | |
😡 You must hate yourself. | |
Ha! Yeah, that'll work. 😄 | |
😕 Are you just hitting keys at random? | |
You code like a PM. 😐 |
# Allows for any file to be extracted using: x $1 | |
x () { | |
if [ -f $1 ] ; then | |
case $1 in | |
*.tar.bz2) tar xjf $1 ;; | |
*.tar.gz) tar xzf $1 ;; | |
*.bz2) bunzip2 $1 ;; | |
*.rar) rar x $1 ;; | |
*.gz) gunzip $1 ;; | |
*.tar) tar xvf $1 ;; |
[ | |
// move backward/forward using mouse button 4, 5 | |
{ // remove exsiting bind | |
"key": "", | |
"command": "editor.action.indentLines", | |
"when": "editorTextFocus && !editorReadonly" | |
}, | |
{ // remove exsiting bind | |
"key": "", |
#!/bin/bash | |
# This is a draft but it works | |
# FIRST (I don't even know if it works but we'll assume yes) | |
# sudo launchctl list | |
# sudo launchctl disable system/netbiosd | |
# sudo launchctl disable system/parsecd | |
# sudo launchctl disable system/parentalcontrols.check | |
# sudo launchctl disable system/airportd |
#!/bin/bash | |
# A wrapper script to make sublime_merge work more nicely | |
# when used as a git-mergetool | |
WORKDIR=`git rev-parse --show-toplevel` | |
REAL_HOME="$HOME/" | |
# Replace a leading homedir with ~/ to match the window title | |
REAL_WORKDIR=${WORKDIR/"^$REAL_HOME"/"~/"} | |
sublime_merge $REAL_WORKDIR |
# Ways to execute a shell script in Ruby | |
# Example Script - Joseph Pecoraro | |
cmd = "echo 'hi'" # Sample string that can be used | |
# 1. Kernel#` - commonly called backticks - `cmd` | |
# This is like many other languages, including bash, PHP, and Perl | |
# Synchronous (blocking) | |
# Returns the output of the shell command | |
# Docs: http://ruby-doc.org/core/classes/Kernel.html#M001111 |
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"