git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
#!/bin/bash | |
## Bash Script to clear cached memory on (Ubuntu/Debian) Linux | |
## By Philipp Klaus | |
## see <http://blog.philippklaus.de/2011/02/clear-cached-memory-on-ubuntu/> | |
if [ "$(whoami)" != "root" ] | |
then | |
echo "You have to run this script as Superuser!" | |
exit 1 | |
fi |
/(youtu(?:\.be|be\.com)\/(?:.*v(?:\/|=)|(?:.*\/)?)([\w'-]+))/i | |
Tested examples: | |
http://www.youtube.com/user/Scobleizer#p/u/1/1p3vcRhsYGo | |
http://www.youtube.com/watch?v=cKZDdG9FTKY&feature=channel | |
http://www.youtube.com/watch?v=yZ-K7nCVnBI&playnext_from=TL&videos=osPknwzXEas&feature=sub | |
http://www.youtube.com/ytscreeningroom?v=NRHVzbJVx8I | |
http://www.youtube.com/user/SilkRoadTheatre#p/a/u/2/6dwqZw0j_jY | |
http://youtu.be/6dwqZw0j_jY | |
http://www.youtube.com/watch?v=6dwqZw0j_jY&feature=youtu.be |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
#!/bin/sh | |
#copy directly into /usr/bin | |
if [ -s /tmp/__pserver ]; then | |
kill `cat /tmp/__pserver` | |
fi | |
python -m SimpleHTTPServer 1>>/dev/null 2>>/tmp/log.pserver & | |
echo -n $! > /tmp/__pserver |
sudo dscl . -append /groups/wheel GroupMembership <username> | |
# now `sudo visudo` and remove comment from: %wheel ALL=(ALL) NOPASSWD: ALL |
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
#!/bin/bash | |
# see: http://blog.tomtung.com/2009/11/cowsay-fortune | |
# http://www.commandlinefu.com/commands/view/3584/remove-color-codes-special-characters-with-sed | |
# https://github.com/busyloop/lolcat | |
# https://github.com/dorentus/mruby-lolcat-bin | |
# | |
# requires `fortune`, `cowsay`, | |
# and ruby gem `lolcat` or its mruby version equivalent | |
export LANG="en_US.UTF-8" |
Assuming there's a /test folder with .txt files in it. Note how the * character is escaped to prevent expansion.
Linux and Cygwin
find /test -name \*.txt -exec sed -i 's/oldValue/newValue/g' {} \;
macOS
In sed the -i option edits files in-place instead of printing to standard output and requires a file extension.
Use "" to overwrite the file in place.
<html lang="en"> | |
<head> | |
<script> | |
function str2hex(str) | |
{ | |
var out_str = " "; | |
for(var i = 0; i < str.length; i++) | |
{ |