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($,e,b){var c="hashchange",h=document,f,g=$.event.special,i=h.documentMode,d="on"+c in e&&(i===b||i>7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){r||l(a());n()}).attr("src",r||"javascript:0").insertAfter("body")[0].contentWindow;h.onpropertychange=function(){try{if(event.propertyName==="title"){q.document.title=h.title}}catch(s |
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 | |
class MongoAPI{ | |
private $db; | |
private $col; | |
private $apiKey; | |
public function __construct($db,$col,$apiKey){ | |
$this->db = $db; | |
$this->col = $col; |
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 os | |
import sys | |
import pickle | |
import console | |
import dropboxlogin # this code can be found here https://gist.github.com/4034526 | |
STATE_FILE = '.dropbox_state' | |
class dropbox_state: |
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 console | |
console.show_activity() | |
import urllib | |
from urllib import urlencode | |
import bs4 | |
import requests | |
import webbrowser | |
import sys | |
import sound | |
sound.load_effect('Powerup_2') |
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
# Image Effects | |
# Demonstrates some effects using different modules | |
# from the Python Imaging Library (PIL). | |
# | |
# Tip: You can touch and hold an image in the output | |
# to copy it to the clipboard or save it to your | |
# camera roll. | |
import Image, ImageOps, ImageFilter | |
from Image import BILINEAR |
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
// Place this code in your functions.php | |
// Then when you want to embed a gist, use [gist GISTID] and it will show up in your post | |
function embedGists( $atts ) { | |
$gist = $atts[0]; | |
$string = '<script src="https://gist.github.com/'.$gist.'.js"></script>'; | |
return $string; | |
} | |
add_shortcode( 'gist', 'embedGists' ); |
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
<style type='text/css'> | |
#categoryBackNextButtons{ | |
width:490px; | |
} | |
@-moz-document url-prefix() { | |
#categoryBackNextButtons{ | |
width:486px; | |
} | |
} | |
</style> |
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
<style type='text/css'> | |
@-moz-document url-prefix() { | |
} | |
</style> |
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 | |
/* | |
Move second crack files to wordpress: | |
1) Create a folder called "migrate", and upload this file to that folder. | |
2) Upload the PHPMarkdownExtra and PHP Smartypants libraries to this folder as well. | |
3) Move the posts folder from your second crack site into this folder. | |
4) In your browser, run: http://mysite/migrate/migrate.php and let it run. | |
This will move all posts in your posts folder into wordpress, it doesn't touch pages, only posts. |
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
<!DOCTYPE html> | |
<html> | |
<body> | |
<h1>Todo List</h1> | |
<form id="todo_form" method="post" accept-charset="utf-8"> | |
<p><input type="text" name="todo_field" value="" id="todo_field" /><input type="submit" value="Create Todo" /></p> | |
</form> | |
<p>You have <span id="todo_count">?</span> todos remaining.</p> | |
<div id="todo_list_wrapper"></div> |