This file contains 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/python2 | |
# Go to dev.twitter.com/apps and create a new app; put the information here. | |
# You need the tweepy library. | |
consumer_secret = '' | |
consumer_key = '' | |
access_token_key = '' | |
access_token_secret = '' |
This file contains 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 | |
# Gitolite-Trac post-receive hook | |
# Script written by Nilesh Govindrajan; http://nileshgr.com | |
# Updated by giotti to support multiple repositories. | |
# Assumptions: | |
# 1: all trac environments are saved under one common directory | |
# defined in tracenv. e.g. /path/to/all/my/trac/envs | |
# 2: all repositories of an environment follow the naming-pattern | |
# <environment><delimeter><repository name>[<delimeter><repository name continued>...], | |
# e.g. someproject-somerepository, or someproject-somerepository-with-extra-text |
This file contains 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
NOTE -- You need eyeD3 python library and id3lib (C++ library) for the commands eyeD3 and id3info respectively. | |
find -name '*.mp3' | while IFS= read -r file; do | |
artists_org=$(id3info "$file" | grep TPE1 | awk -F ': ' ' { print $2 }') | |
artists_new=$(echo $artists_org | sed 's@/@, @g' | sed 's/ *$//g') | |
eyeD3 -a "$artists_new" "$file" | |
done |
This file contains 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
BACKUP YOUR EXISTING DB IF ANY!!! | |
Download your Twitter Archive, extract -- get a fresh one. | |
Upload data/js/tweets to your server. | |
Login to server and execute the following commands: | |
mv tweets tweets_src | |
mkdir tweets | |
cd tweets |
This file contains 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
if ($http_accept ~* "webp") { | |
set $webp "true"; | |
} | |
if (-e $request_filename.webp) { | |
set $webp "${webp}-local"; | |
} | |
if ($webp = "true-local") { | |
rewrite (.*) $1.webp last; |
This file contains 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 | |
alias ipfw=/sbin/ipfw | |
ipfw -f flush | |
# Make sure you have ipfw_nat_load=yes in loader.conf | |
# Map port 2201 on first public IP to first jail's port 22 | |
ipfw nat 1 config ip <public ip> unreg_only same_ports redirect_port tcp 192.168.0.1:22 2201 |
This file contains 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
Options +FollowSymLinks | |
RewriteEngine on | |
RewriteCond %{REQUEST_URI} =/ | |
RewriteCond %{HTTP_HOST} =www.site.com | |
RewriteRule (.*) http://www.site.com/folder/ [L] |
This file contains 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
<Macro php $username $siteroot> | |
AddHandler php-fcgi .php | |
FastCgiExternalServer $siteroot/cgi-bin/php.fcgi -socket /var/run/php-fpm-$username.sock -pass-header Authorization -idle-timeout 600 | |
Action php-fcgi /cgi-bin/php.fcgi | |
</Macro> | |
<Macro phpvhost $hostname $siteroot $username $aliases> | |
<VirtualHost *:80> | |
ServerName $hostname | |
ServerAlias www.$hostname $aliases |
This file contains 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
# To specify the start up order of your ezjails, use these lines to | |
# create a Jail dependency tree. See rcorder(8) for more details. | |
# | |
# PROVIDE: standard_ezjail | |
# REQUIRE: | |
# BEFORE: | |
# | |
export jail_mail_hostname="mail" | |
export jail_mail_ip="lo2|10.0.0.2/24,re0|<ipv4>,re0|<ipv6>" |
This file contains 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
WRKDIRPREFIX= /var/ports | |
DISTDIR= /var/ports/distfiles | |
PACKAGES= /var/ports/packages | |
INDEXDIR= /var/ports | |
CPUTYPE=corei7-avx | |
CFLAGS+= -O2 -pipe | |
CXXFLAGS+= -O2 -pipe | |
COPTFLAGS= -O2 -pipe | |
PGSQL_DEFAULT?=9.3 |
OlderNewer