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
function displayView($view, $id = 0) | |
... | |
case 'save': | |
$tpl_vars = array(); | |
if (isset($_GET['url'])){ | |
$tpl_vars['url'] = $_GET['url']; | |
} | |
if (isset($_GET['encoded_url'])){ | |
$tpl_vars['encoded_url'] = $_GET['encoded_url']; | |
} |
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 | |
# Check if command was ran as root. | |
if [[ $(id -u) -eq 0 ]]; then | |
echo "The command \"sphp\" should not be executed as root or via sudo directly." | |
echo "When a service requires root access, you will be prompted for a password as needed." | |
exit 1 | |
fi | |
# Usage |
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/env python | |
import argparse | |
import fileinput | |
import grp | |
import json | |
import urllib.request | |
import os | |
import subprocess | |
import tarfile |
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
require "rubygems" | |
require "twitter" | |
require "json" | |
# things you must configure | |
TWITTER_USER = "" | |
TWITARCHIVE_TWEETS = "/eg/path/to/your/twitarchive/data/js/tweets" | |
# get these from dev.twitter.com | |
CONSUMER_KEY = "" |