Skip to content

Instantly share code, notes, and snippets.

@thrashr888
thrashr888 / s3copy
Created October 2, 2012 08:31
s3copy copies files and streams to a public S3 file and copies the url to your clipboard.
#!/usr/local/bin/php
<?php
error_reporting(-1);
define('CFRUNTIME_NAME', 'aws-sdk-php');
define('CFRUNTIME_VERSION', 'Panther');
define('CFRUNTIME_BUILD', '20120926163000');
define('CFRUNTIME_USERAGENT', CFRUNTIME_NAME . '/' . CFRUNTIME_VERSION . ' PHP/' . PHP_VERSION . ' ' . str_replace(' ', '_', php_uname('s')) . '/' . str_replace(' ', '_', php_uname('r')) . ' Arch/' . php_uname('m') . ' SAPI/' . php_sapi_name() . ' Integer/' . PHP_INT_MAX . ' Build/' . CFRUNTIME_BUILD . __aws_sdk_ua_callback());
@zziuni
zziuni / stuns
Created September 18, 2012 08:05
STUN server list
# source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list
# A list of available STUN server.
stun.l.google.com:19302
stun1.l.google.com:19302
stun2.l.google.com:19302
stun3.l.google.com:19302
stun4.l.google.com:19302
stun01.sipphone.com
stun.ekiga.net
@faryne
faryne / gist:1977508
Created March 5, 2012 08:45
利用PHP抓Youtube影片(範例程式)
<?php
/**
使用前請先下載phpQuery,
否則你需要自己改寫get_meta_data方法的內容
*/
require_once 'libraries/phpQuery.php'; // 請更改為phpQuery的位置
define('lang_ytdl02', '低品質影片', true);
define('lang_ytdl03', '標準品質影片', true);
define('lang_ytdl05', '高畫質影片', true);
@oodavid
oodavid / README.md
Last active March 11, 2025 21:41 — forked from aronwoost/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@trepmal
trepmal / pw-at-signup.php
Created December 20, 2011 21:58
WordPress: Choose password at registration (Multisite)
<?php
//Plugin Name: Choose password at registration (Multisite)
//Description: Doesn't change the confirmation screen or email
add_action('signup_extra_fields', 'ask_for_password');
function ask_for_password( $errors ) {
if ( $errmsg = $errors->get_error_message('bad_password') ) {
echo '<p class="error">'.$errmsg.'</p>';
}