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 ruby | |
=begin | |
Created by keyvan | |
#newznab on irc.synirc.net | |
This script is for importing a giant dump of NZB files into newznab. Be warned, it's HACKY! | |
1) I expect you have downloaded a big archive full of nzbs and have extracted it. | |
The directory structure should be like this: | |
dump/ | |
MoviesHD/ |
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
Show hidden characters
[ | |
{ "keys": ["ctrl+shift+e"], "command": "open_folder_in_explorer" } | |
] |
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 | |
# Copyright (c) 2011 Float Mobile Learning | |
# http://www.floatlearning.com/ | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining | |
# a copy of this software and associated documentation files (the "Software"), | |
# to deal in the Software without restriction, including without limitation | |
# the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
# and/or sell copies of the Software, and to permit persons to whom the |
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 | |
/** | |
* Remove a given term from the specified post | |
* | |
* Helper function since this functionality doesn't exist in core | |
*/ | |
function my_remove_post_term( $post_id, $term, $taxonomy ) { | |
if ( ! is_numeric( $term ) ) { |
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
/* | |
* http://ejohn.org/blog/deep-profiling-jquery-apps/ | |
* use: call jQuery.displayProfile(); in firebug console | |
*/ | |
(function(){var log=[];var handle=jQuery.event.handle,ready=jQuery.ready;var internal=false;var eventStack=[];var curEvent=log[0]={event:"inline",methods:[],duration:0};if(!jQuery.readyList)jQuery.readyList=[];jQuery.readyList.unshift(function(){if(curEvent&&curEvent.event=="inline"&&curEvent.methods.length==0){log.shift()}if(curEvent)eventStack.push(curEvent);var e=curEvent=log[log.length]={event:"ready",target:formatElem(document),methods:[]};var start=(new Date).getTime();jQuery(document).bind("ready",function(){e.duration=(new Date).getTime()-start;curEvent=eventStack.pop()})});jQuery.event.handle=function(event){var pos=log.length;if(curEvent)eventStack.push(curEvent);var e=curEvent=log[pos]={event:event.type,target:formatElem(event.target),methods:[]};var start=(new Date).getTime();var ret=handle.apply(this,arguments);e.duration=(new Date).getTime()-start;curEvent=eventStack.pop();if(e.me |
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
$sprites: sprite-map("sprites/*.png"); | |
$sprites-retina: sprite-map("sprites-retina/*.png"); | |
@mixin sprite-background($name) { | |
background-image: sprite-url($sprites); | |
background-position: sprite-position($sprites, $name); | |
background-repeat: no-repeat; | |
display: block; | |
height: image-height(sprite-file($sprites, $name)); | |
width: image-width(sprite-file($sprites, $name)); |
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
jQuery.loadScript = function (url, arg1, arg2) { | |
var cache = false, callback = null; | |
//arg1 and arg2 can be interchangable as either the callback function or the cache bool | |
if ($.isFunction(arg1)){ | |
callback = arg1; | |
cache = arg2 || cache; | |
} else { | |
cache = arg1 || cache; | |
callback = arg2 || callback; | |
} |
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
$sprites: sprite-map("sprites/*.png"); | |
$sprites-retina: sprite-map("sprites-retina/*.png"); | |
@mixin sprite-background($name) { | |
background-image: sprite-url($sprites); | |
background-position: sprite-position($sprites, $name); | |
background-repeat: no-repeat; | |
display: block; | |
height: image-height(sprite-file($sprites, $name)); | |
width: image-width(sprite-file($sprites, $name)); |
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 | |
# Of course, the author does not guarantee safety. | |
# I did my best by using SQLite's online backup API. | |
from __future__ import print_function | |
import sys, ctypes | |
from ctypes.util import find_library | |
SQLITE_OK = 0 | |
SQLITE_ERROR = 1 | |
SQLITE_BUSY = 5 |
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 | |
function x_allow_ids_on_tags() { | |
global $allowedposttags; | |
$tags = array( 'section', 'article' ); | |
$new_attributes = array( 'id' => array() ); | |
foreach ( $tags as $tag ) { | |
if ( isset( $allowedposttags[ $tag ] ) && is_array( $allowedposttags[ $tag ] ) ) | |
$allowedposttags[ $tag ] = array_merge( $allowedposttags[ $tag ], $new_attributes ); |
OlderNewer