Skip to content

Instantly share code, notes, and snippets.

@dukwon
dukwon / record.sh
Last active November 13, 2015 00:24
#!/bin/bash
vps='188.166.55.237'
fmt='mp3'
codec='libmp3lame'
ffmpeg -f alsa -i pulse -acodec $codec -ab 96k -y "output.$fmt"
name=$(cat /dev/urandom | tr -dc "a-zA-Z0-9" | fold -w 6 | head -n 1)
existing=($(ssh $vps ls /var/www/html/*.$fmt | sed -r "s/\/var\/www\/html\/(\w*)\.$fmt/\1/"))
while [[ " ${existing[@]} " =~ " ${name} " ]]
do
echo "A file named $name.$fmt already exists on server."
type: link submission
url: ["youtube.com", "youtu.be"]
author:
account_age: < 60 days
action: report
report_reason: "YouTube video from young account"
#ifndef __GRADIENTS_H__
#define __GRADIENTS_H__
#include "TColor.h"
#include "TStyle.h"
void rainbowgradient()
{
const int NRGBs = 7;
const int NCont = 255;
double stops[NRGBs] = { 0.00, 0.20, 0.40, 0.50, 0.60, 0.80, 1.00 };
double red[NRGBs] = { 0.00, 0.00, 0.00, 0.00, 1.00, 1.00, 0.50 };
@dukwon
dukwon / sidebar-button.css
Last active June 23, 2016 13:57 — forked from prawnsalad/sidebar-button.css
orangechat.io sidebar button
.titlebox .usertext-body .md em a[href^="https://app.orangechat.io"] {
font-style: normal;
display: block;
text-decoration: none;
padding: 12px 12px 12px 12px;
margin: 12px 0;
border-radius: 3px;
text-align: center;
cursor: pointer;
font-size: 1.5em;
@dukwon
dukwon / sidebar-button.css
Last active June 23, 2016 15:46
KiwiIRC subreddit sidebar button CSS
.titlebox .usertext-body .md em a[href^="https://kiwiirc.com/client/"] {
font-style: normal;
display: block;
text-decoration: none;
padding: 12px 12px 12px 12px;
margin: 12px 0;
border-radius: 3px;
text-align: center;
cursor: pointer;
font-size: 1.5em;
__module_name__ = "strip_discord_bots"
__module_version__ = "1.0"
__module_description__ = "Treat messages from discord IRC bridges as if they came from IRC users"
import hexchat, re
discord_bridges = {
# define your discord bridge bots here
# network and channel names must be lower case
"snoonet": {