This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
GREP="grep" | |
GREP_E="not found" | |
CURDIR=`pwd` | |
TITLEINFO_1="beet info " | |
TITLEINFO_2=" | grep \"\ title:\" | awk -F':' '{print \$2 }' | sed 's/^ //g'" | |
TIMEINFO_1="mp3info -p \"\%S\"" | |
TIMEINFO_2="" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: protheus | |
# Required-Start: $local_fs $remote_fs $network $syslog $named | |
# Required-Stop: $local_fs $remote_fs $network $syslog $named | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# X-Interactive: true | |
# Short-Description: Start/stop protheus server | |
### END INIT INFO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Script to keep downloading YouTube videos to your computer using youtube-dl: | |
# http://rg3.github.io/youtube-dl/ | |
# | |
# Put it to work: | |
# | |
# sudo wget "https://gist.github.com/vmassuchetto/10338703/raw" -O /etc/cron.hourly/youtube-dl-cron.sh | |
# sudo chmod +x /etc/cron.hourly/youtube-dl-cron.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// we need memory and time | |
ini set( 'memory limit', -1); | |
set_time_limit( 0 ); | |
// WordPress environment | |
include( 'wp-load.php' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# begin section managed by etckeeper (do not edit this section by hand) | |
# new and old versions of conffiles, stored by dpkg | |
*.dpkg-* | |
# new and old versions of conffiles, stored by ucf | |
*.ucf-* | |
# old versions of files | |
*.old |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Wraps a message $content in a responsive e-mail template. | |
* | |
* Reference: http://zurb.com/playground/projects/responsive-email-templates/basic.html | |
*/ | |
function post_mail_content( $content ) { | |
ob_start(); ?><html xmlns="http://www.w3.org/1999/xhtml"><head> | |
<meta content="width=device-width" name="viewport"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This scripts is intended to be triggered by Git hooks. For deployment you'll | |
* probably want to use `post-update`: | |
* http://schacon.github.io/git/githooks.html#post-update | |
* | |
* First, set the `PASS` constant to limit access to this script and use it as | |
* a `pass` GET variable. | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for FILE in `rgrep -il "youtube.com" * | grep -v iframe` ; do | |
perl -p -i -e 's/(<p>)?.*youtube\.com\/watch.*v=([A-Za-z0-9]*).*(<\/p>)?/<iframe width="560" height="315" frameborder="0" src="\/\/www\.youtube\.com\/embed\/\2\" allowfullscreen><\/iframe>/g' $FILE ; | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Credits to: | |
# - http://vstone.eu/reducing-vagrant-box-size/ | |
# - https://github.com/mitchellh/vagrant/issues/343 | |
# - https://gist.github.com/adrienbrault/3775253 | |
# Unmount project | |
umount /vagrant |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
FILES_READ_PATH = '/path/to/txt/files' | |
FILES_WRITE_PATH = '/where/to/save/images' | |
FROM_USER = 'you_username' | |
FROM_FLICKR_API_KEY = 'some_key' | |
FROM_FLICKR_API_SECRET = 'some_secret' | |
TO_USER = 'your_username' |