Moved to: https://github.com/EmanueleMinotto/crystal
Read more: https://github.com/EmanueleMinotto/crystal/wiki
[[email protected] www]$ cat .htaccess | |
RewriteEngine on | |
RewriteCond %{QUERY_STRING} resource=acct:(.+) | |
RewriteRule ^\.well-known/webfinger /profile/%1? [L] | |
[[email protected] www]$ cat profile/[email protected] | |
{ | |
"subject": "acct:[email protected]", | |
"links": [ | |
{ |
javascript:(function(){var p=document.createElement("p");p.innerHTML="<strong>Loading…</strong>";p.id="loadingp";p.style.padding="20px";p.style.background="#fff";p.style.left="20px";p.style.top=0;p.style.position="fixed";p.style.zIndex="9999999";p.style.opacity=".85";document.body.appendChild(p);document.body.appendChild(document.createElement("script")).src="https://gist.github.com/ttscoff/5834741/raw/grablinks.js?x="+(Math.random());})(); |
<?php | |
function github_markdown($text) { | |
$ch = curl_init('https://api.github.com/markdown/raw'); | |
curl_setopt_array($ch, array( | |
\CURLOPT_POST => true | |
, \CURLOPT_RETURNTRANSFER => true | |
, \CURLOPT_POSTFIELDS => $text | |
, \CURLOPT_SSL_VERIFYPEER => false | |
, CURLOPT_HTTPHEADER => array('Content-Type: text/plain'))); |
<?php | |
/* Shorten a URL using Google's goo.gl API. Requires an API key. */ | |
function googl_shorten_url($url, $api_key) { | |
$endpoint = 'https://www.googleapis.com/urlshortener/v1'; | |
$ch = curl_init(sprintf('%s/url?key=%s', $endpoint, $api_key)); | |
curl_setopt_array($ch, array( | |
\CURLOPT_POST => true | |
, \CURLOPT_AUTOREFERER => true | |
, \CURLOPT_FOLLOWLOCATION => true | |
, \CURLOPT_SSL_VERIFYPEER => false |
#!/bin/bash | |
# | |
# Steam installer for Debian wheezy (32- and 64-bit) | |
# | |
# Place into empty directory and run. | |
# | |
download() { | |
local url="$1" | |
local filename="$(basename "$url")" |
<?php | |
require_once('/path/to/wordpress/wp-load.php'); | |
require_once('class-wp_post_helper.php'); | |
// initialize | |
$post = new wp_post_helper(array( | |
'post_name' => 'slug' , // slug | |
'post_author' => 1 , // author's ID | |
'post_date' => '2012/11/15 20:00:00' , // post date and time | |
'post_type' => 'posts' , // post type (you can use custom post type) |
### | |
####### HISTIGNORE ####### | |
### | |
# examples from interwebs, noob dot file notes | |
#export HISTIGNORE='pwd:exit:fg:bg:top:clear' | |
# (if try to erasedups do not ignore things want 2 pune but on OSX it no workie) | |
# ignore things that start with a space, and ignore the exit command | |
#HISTIGNORE='[ \t]*:exit' | |
# some slashdot dudes says | |
#export HISTIGNORE="&:ls:[bf]g:exit:pwd:clear:mount:umount:[ \t]*" |