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 | |
# Onion Pi, based on the Adafruit Learning Technologies Onion Pi project. | |
# For more info: http://learn.adafruit.com/onion-pi | |
# | |
# To do: | |
# * Options for setting up relay, exit, or bridge | |
# * More anonymization of Onion Pi box | |
# * Further testing | |
if (( $EUID != 0 )); then |
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 | |
# Based on Adafruit Learning Technologies Onion Pi project | |
# More info: http://learn.adafruit.com/onion-pi | |
if (( $EUID != 0 )); then | |
echo "This must be run as root. Try 'sudo bash $0'." | |
exit 1 | |
fi | |
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
ffmpeg -i INPUT.mp4 -vf scale=-1:720 -c:v libx264 -crf 18 -preset veryslow -c:a copy OUTPUT.mp4 | |
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
import time | |
import BaseHTTPServer | |
import requests | |
# To install requests : git clone git://github.com/kennethreitz/requests.git | |
# Then [sudo] python setup.py install | |
# An html renderer subdomain | |
HOST_NAME = 'html.example.com' | |
PORT_NUMBER = 80 |
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
/** | |
* Appcelerator Titanium Mobile | |
* Copyright (c) 2015 by Appcelerator, Inc. All Rights Reserved. | |
* Licensed under the terms of the Apache Public License | |
* Please see the LICENSE included with this distribution for details. | |
*/ | |
#if defined (USE_TI_UIATTRIBUTEDSTRING) || defined(USE_TI_UIIOSATTRIBUTEDSTRING) | |
#import "TiUIAttributedStringProxy.h" | |
#import "TiProxy.h" | |
#import "TiUtils.h" |
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 | |
if [ "$EUID" -ne 0 ] | |
then echo "Must be root" | |
exit | |
fi | |
if [[ $# -ne 1 ]]; | |
then echo "You need to pass a password!" | |
echo "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
<?php | |
//opcache_reset(); // Disable local dev MAMP cache | |
/* | |
WP_API_OAuth_Test_client.php | |
Tested with Wordpress 4.7.1 | |
WordPress REST API - OAuth 1.0a Server v.0.3.0 - https://en-gb.wordpress.org/plugins/rest-api-oauth1/ |
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
Setting Up A Localhost Self-signed Certificate For Local Https Development | |
========================================================================== | |
- GENERATE THE CERTIFICATE | |
# 1. generate key | |
- create an 'ssl' folder somewhere | |
- cd to it |
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
// GET and parsing some remote JSON data inside an iOS module for a Titanium app. | |
// @Kosso | |
// Test with amazingtunes.com API of recently played tunes on /AmazingRadio/. | |
NSString *amazingHistory = @"http://amazingtunes.com/radio/history.json"; | |
-(void)getData:(id)args | |
{ | |
NSLog(@"[INFO] getData"); |
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
/* | |
// Author : @kosso | |
// Date : May 10, 2015. | |
// FTP binary data file uploader. With notes etc. which I cobbled togethr while trying to work out this elusive dark art. | |
All examples I found were using the 'STOR' command incorrectly and wondering why they were getting empty files appear (if they were lucky). | |
Also, most if not all were using the deprecated Ti.Network.createTCPSocket() method instead of Ti.Network.Socket.createTCP(). | |
eg : http://stackoverflow.com/questions/23971311/titanium-appcelerator-ftp-upload |