Not for everyone. Each programmer has their own appreciation of what is good coding music.
(From most influential to least)
UPDATE wp_posts SET guid = replace(guid, 'http://old-domain','http://new-domain'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://old-domain', 'http://new-domain'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://old-domain','http://new-domain'); | |
UPDATE wp_options set option_value='http://new-domain' where option_name in ('siteurl', 'home'); |
Not for everyone. Each programmer has their own appreciation of what is good coding music.
(From most influential to least)
#!/usr/bin/env python | |
from sklearn.tree import * | |
import json | |
def object_decoder(obj): | |
klass = globals()[obj['__type__']] | |
objekt = klass() | |
for key in obj: | |
if key != '__type__': |
cat ph_check_page.csv | awk '{ gsub("\r?\n|\r", "", $0); print $0 }' | xargs -I$ curl -s -I $ > ph_link_check.log |
Theme for oh-my-zsh: agnoster | |
Meslo Font: https://github.com/andreberg/Meslo-Font/blob/master/dist/v1.2.1/Meslo%20LG%20v1.2.1.zip (fontsize 14) | |
Material Theme for Iterm2: https://github.com/MartinSeeler/iterm2-material-design |
#!/bin/bash | |
for f in *.mp4 | |
do | |
echo "Converting $f" | |
name=`echo "$f" | sed -e "s/.mp4$//g"` | |
ffmpeg -i "$f" -vn -acodec libmp3lame -ac 2 -ab 160k -ar 48000 "$name.mp3" | |
done |
#!/usr/bin/env bash | |
usage () { | |
echo "i4b-request-count.sh" | |
echo "---- Usage:" | |
echo "---- i4b-request-count [start-date-time] [end-date-time]" | |
echo "---- eg: ./i4b-request-count.sh '2017-09-15 00:00:00' '2017-10-15 23:59:59'" | |
} | |
E_NO_ARGS=65 | |
if [ -z "$1" ] || [ -z "$2" ]; then | |
usage |
# | |
# CORS header support | |
# | |
# One way to use this is by placing it into a file called "cors_support" | |
# under your Nginx configuration directory and placing the following | |
# statement inside your **location** block(s): | |
# | |
# include cors_support; | |
# | |
# As of Nginx 1.7.5, add_header supports an "always" parameter which |
from app import log | |
logger = log.get_logger() | |
class BookingResource(object): | |
def __init(self): | |
pass | |
def on_put(self, req, resp, booking_id): | |
try: |