Skip to content

Instantly share code, notes, and snippets.

View ScoreUnder's full-sized avatar

score ScoreUnder

View GitHub Profile
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
int chday(int day, int month, int year);
int chmonth(int month);
int chyear(int year);
int leapYear(int y);
int day_of_year(int d, int m, int y);
int chday(int day, int month, int year) {
@ScoreUnder
ScoreUnder / discord.js
Last active April 6, 2017 09:25 — forked from kuntau/discord.js
Hide Discordapp channel sidebar
//ref: http://andrewhfarmer.com/hide-discord-sidebar/
var cmd$ = $;
document.addEventListener('keydown', function(event) {
if (event.metaKey && event.keyCode === 220) {
// Toggle visibility of the channel and guilds columns
var channelWrap = cmd$('.flex-vertical.channels-wrap');
var guildsWrap = cmd$('.guilds-wrapper');
var titleWrap = cmd$('.title-wrap');
if (channelWrap.getAttribute('style') === 'display: none') {
channelWrap.setAttribute('style', '');
@ScoreUnder
ScoreUnder / fw.py
Last active March 28, 2017 08:43 — forked from Ravenslofty/fw.py
What is this "readability" you speak of?
for l in __import__('fileinput').input():print(*[((c,chr(ord(c)+65248))[ord(c)<127]," ")[c==" "]for c in l[:-1]],sep='')
@ScoreUnder
ScoreUnder / pomfload
Last active August 29, 2015 14:01 — forked from xy4n/pomfload
#!/bin/sh
# Requires node.js: sudo pacman -Sy nodejs
if [ $# -lt 1 ]; then
echo "Usage: $(basename "$0") FILE [FILE...]" >&2
exit 1
fi
for f in "$@"; do
d=$(node -pe "JSON.parse(process.argv[1]).files[0].url" "$(curl -sS --progress-bar -F "files[]=@$f" http://pomf.se/upload.php)")