Skip to content

Instantly share code, notes, and snippets.

Hyde publisher plugin for publishing content to Github Pages (User Pages).

https://github.com/vaidik/vaidik.github.io/tree/dev/publishers

Usage

  • Make sure that the hyde project lives in your dev branch. master branch, in case of user github pages, is left for serving static files.
  • Create an orphan master branch.
{
"auto_upgrade_last_run": null,
"installed_packages":
[
"Alignment",
"All Autocomplete",
"Calculate",
"Case Conversion",
"Clipboard Manager",
"Codechef",
class ReloaderEventHandler(FileSystemEventHandler):
"""
Listen for changes to modules within the Django project
On change, reload the module in the Python Shell
Custom logic required to reload django models.py modules
Due to the singleton AppCache, which caches model references.
For those models files, we must clear and repopulate the AppCache
"""
def __init__(self, *args, **kwargs):
@vaidik
vaidik / utils.js
Created November 24, 2012 03:10
Some utility script that I have used (at times) and might want to use later in my projects.
/**
* Checks if an object is empty or not.
*/
Object.prototype.isEmpty = function() {
for(var key in this) {
if (this.hasOwnProperty(key)) {
return false;
}
}
return true;
@vaidik
vaidik / redis
Created November 19, 2012 13:23
Redis Service Startup Script for Red Hat derivatives
#!/bin/sh
#
# chkconfig: 2345 50 50
# description: redis-server is a key-value store by VMWare.
# processname: redis-server
# pidfile: /var/run/redis.pid
# config: /etc/redis/6379.conf
# command: /usr/local/bin/redis-server
#
# Taken from original https://github.com/antirez/redis/blob/unstable/utils/redis_init_script
@vaidik
vaidik / youtube-dl-mp3
Created February 11, 2012 05:45
Script that makes use of youtube-dl and ffmpeg to cleanly extract mp3 out of Youtube videos.
# Get/download youtube-dl from http://rg3.github.com/youtube-dl/
# Make it executable (chmod +x <path-to-youtube-dl>/youtube-dl)
# Copy it to /usr/bin to use it like a command (sudo cp <path-to-youtube-dl>/youtube-dl /usr/bin)
# Open your favourite editor and copy this script and save by any name you like (I use youtube-dl-mp3).
# Make it executable (chmod +x <path-to-youtube-dl-mp3>/youtube-dl-mp3)
# Copy it to /usr/bin to use it like a command (sudo cp <path-to-youtube-dl-mp3>/youtube-dl-mp3 /usr/bin)
# Done! :)
# Usage: youtube-dl-mp3 "http://www.youtube.com/watch?v=YnA6ExlxNJU&feature=fvst"
if [ -w "." ]