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
// The MIT License (MIT) | |
// Copyright (c) 2014-2016 Jack O'Connor | |
// https://github.com/jackocnr/intl-tel-input | |
// 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 Software is |
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 | |
# Depends: scrot, feh, gnome-screenshot, zenity, xclip | |
outputDir="~/Pictures" | |
output="Screenshot_`date +"%y-%m-%d-%T"`.png" | |
tmp=$(mktemp -u); scrot -e "mv \$f $tmp"; feh -F $tmp & gnome-screenshot -a -f $outputDir/$output && rm $tmp && pkill -P $$ | |
# Rewritable upload command |
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
// ==UserScript== | |
// @name YouTube Trending is trash | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description YouTube Trending is trash | |
// @author Evert | |
// @match https://www.youtube.com/* | |
// @grant none | |
// ==/UserScript== |
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
// $ node queue <file name or youtube URL> | |
const net = require('net') | |
let client = net.connect(1234, 'localhost') | |
client.on('connect', function () { | |
if (process.argv[2]) { | |
console.log('Queueing ' + process.argv[2]) | |
client.write('queue.push smart:' + process.argv[2] + '\r\n') | |
} |
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
# UUID Generation | |
func generate_uuid(): | |
var repls = "xxxxxxxx-xxxx-4xxx-xxxx-xxxxxxxxxxxx" | |
var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" | |
for c in range(0, repls.length()-1): | |
if repls[c] == "x": | |
randomize() | |
var rander = rand_range(1, chars.length()) - 1 | |
repls[c] = chars[floor(rander)] |
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
/** | |
* Example: | |
* progress_bar(40, 0.5); | |
* Returns: | |
* [####################-------------------] 50% | |
* | |
*/ | |
function progress_bar(barsize, percentage) { | |
let bar = ""; | |
let cnt = Math.floor(barsize * percentage); |
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
class IcyEmitter { | |
constructor() { | |
this.listeners = {}; | |
this.on = this.addEventListener; | |
} | |
emitAll(event) { | |
for(let a in this.listeners) { | |
let scopes = this.listeners[a]; | |
for(let b in scopes) { |
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> | |
<head> | |
<style type='text/css'> | |
body{ | |
margin: 0; | |
padding: 0; | |
background-color: #04050a; | |
color: #fff; | |
font-size: 120%; |
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 | |
# Based on imgur-screenshot by jomo | |
# https://github.com/jomo/imgur-screenshot | |
# | |
# Uploads images to https://lunasquee.eu.org/upload/ | |
# Deps: scrot, xclip, libnotify-bin (also grep and curl) | |
# Works only on linux-based systems | |
# | |
# $HOME/.config/icy-screenshot/settings.conf file can override options below |
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
var net = require('net') | |
var readline = require('readline'); | |
var connected = false; | |
var socket = null; | |
var reconclock = null; | |
function spawn(ADDR, PORT, NICK) { | |
console.log("CREATE SOCK "+ADDR+":"+PORT); | |
socket = net.connect(PORT, ADDR, function() { |
NewerOlder