sudo pip install Django==1.8 graphite-web carbon
brew install cairo
sudo pip install -r https://raw.githubusercontent.com/graphite-project/graphite-web/master/requirements.txt
cd /opt/graphite
sudo chown -R [YOUR_USERNAME] storage
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
SET FOREIGN_KEY_CHECKS = 0; | |
SET @tables = NULL; | |
SELECT GROUP_CONCAT(table_schema, '.', table_name) INTO @tables | |
FROM information_schema.tables | |
WHERE table_schema = 'database_name'; -- specify DB name here. | |
SET @tables = CONCAT('DROP TABLE ', @tables); | |
PREPARE stmt FROM @tables; | |
EXECUTE stmt; | |
DEALLOCATE PREPARE stmt; | |
SET FOREIGN_KEY_CHECKS = 1; |
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
// Kill me if I ever have to use glibc ever again, almost as bad as Perl. | |
#define _GNU_SOURCE | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <string.h> | |
#include <sys/stat.h> | |
#include <sys/types.h> |
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/env python | |
import os | |
from optparse import OptionParser | |
def remove_duplicates(working_path, compare_path, pretend = False, | |
compare_size = False, recurse = False): | |
'''Compares contents of two paths, removing | |
identical content in the working path.''' |
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 | |
#%# family=manual | |
#%# capabilities=autoconf | |
if [ "$1" = "autoconf" ]; then | |
echo yes | |
exit 0 | |
fi | |
if [ "$1" = "config" ]; then |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
$sudo_script = <<SUDOSCRIPT | |
apt-get update | |
apt-get -y install doxygen graphviz | |
apt-get -y --no-install-recommends install texlive-latex-extra texlive-fonts-recommended | |
SUDOSCRIPT | |
Vagrant.configure("2") do |config| |
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 | |
/** | |
* Converts all phpBB 3.1 remote avatars to uploaded avatars. | |
* | |
* To use this script: | |
* | |
* 1. Copy this file into the root of your phpBB installation. | |
* 2. Run the script from the command line: php convert-avatars.php | |
* | |
* Any avatar will be skipped if any errors come up, like these: |
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
git config gc.pruneExpire never | |
git config gc.reflogExpire never | |
git config gc.reflogExpireUnreachable never | |
git config core.logAllRefUpdates true |
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 t in $(git tag -l | grep -v '@' | egrep '^(WX_[23]_[0-9]_[0-9])'); do | |
export GIT_COMMITTER_DATE=$(git log -1 --format=%ad $(echo $t)) | |
VTAG=$(echo $t | sed -e 's/WX_2_4_0_CANDIDATE/WX_2_4_0-rc1/;s/2rc/2-rc/;s/_rc/-rc/;s/^WX_/v/;s/_/\./g;') | |
echo "Tagging $t as $VTAG with $GIT_COMMITTER_DATE" | |
git tag -m "Release $VTAG." $VTAG $t; | |
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/bash | |
# You must generate a personal access token with public_repo | |
# permission, and configure that token using the following: | |
# export GITHUB_TOKEN="..." | |
GITHUB_USER="wxWidgets" | |
GITHUB_REPO="wxWidgets" | |
for directory in v*/; do |