Skip to content

Instantly share code, notes, and snippets.

View Voker57's full-sized avatar

Voker57 Voker57

View GitHub Profile
@Voker57
Voker57 / dick.rb
Last active September 4, 2015 06:25
"dick" plugin for rbot
class DickPlugin < Plugin
def name
"dick"
end
def help(plugin, topic="")
"Adds a bit of huymor to russian words"
end
def hui(m, params)
#!/usr/bin/zsh
# Simple ADOM savegame backuper
# Usage: ./aadom.zsh <savename>
# Requires git and ADOM in $PATH
cd /$HOME/.adom.data/savedg
if [ ! -d .git ]; then
git init
fi
while [ true ]
do
#!/bin/sh
usage()
{
echo "Usage: dump <file|image|text> [file] [language]"
}
case $1 in
file)
URL=`curl -w %{redirect_url} -F "file=@$2" http://dump.bitcheese.net/upload-file?simple`
local defaults={
-- 500 or less makes seconds increment relatively smoothly while playing
update_interval=500
}
local settings=table.join(statusd.get_config("xmms2"), defaults)
local xmms2_timer
local function get_xmms2_status()
require 'reploy'
Reploy.load(:host => "example.com",
:user => "username",
:path => "/var/www/example.com",
:recipes => ["git","scp"])
# Reploy example, see http://bitcheese.net/wiki/reploy/examples
require 'reploy'
Reploy.load(:host => "example.com",
:user => "user",
:path => "/var/www/example.com",
:recipes => ["git", "merb", "rsync"],
:copy => [["config/database.yml","config"]],
:store_backups => false,
<?php
// RIP LyricWiki. You were rather good.
// This script has the same interface as late LyricWiki
// Returning format is html only
error_reporting(0);
function encode($wtf)
{
return urlencode(preg_replace("/\\s+/","_",$wtf));
}
$artist = encode($_REQUEST["artist"]);
module Text.JSON.JPath (jPath) where
import qualified Data.Map as Map
import Data.Maybe
import Text.JSON
import Text.ParserCombinators.Parsec.Combinator
import Text.ParserCombinators.Parsec.Char
import Text.ParserCombinators.Parsec.Prim
data Element = ObjectLookup String | ArrayLookup Int deriving (Show)
#!/usr/bin/ruby
# Hackage [http://hackage.haskell.org] documentation downloader
# Fetches documentation for installed only (or all available) Cabal packages in current directory
# Use --all to download docs for all packages
# Requires wget and cabal to be installed
# by Voker57 <[email protected]>
#
# Public domain
This is very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very long string