Skip to content

Instantly share code, notes, and snippets.

View jyc's full-sized avatar

jyc

View GitHub Profile
{"lastUpdated":1404452632,"Attack":{"Alaska":{"asOf":1404452623,"type":"Army","progress":"986/998"},"Florida":{"asOf":1404452625,"type":"Submarines","progress":"1369/1824"}},"error":null}
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <time.h>
#define NUMBER_OF_TRIALS 10000000
bool both_eating(double time_juan, double time_han, double sample);
double simulate(int number_of_trials);
double xrand();
[Desktop Entry]
Version=1.0
Name=Firefox Beta
# Only KDE 4 seems to use GenericName, so we reuse the KDE strings.
# From Ubuntu's language-pack-kde-XX-base packages, version 9.04-20090413.
GenericName=Web Browser
GenericName[ar]=متصفح الشبكة
GenericName[bg]=Уеб браузър
GenericName[ca]=Navegador web
GenericName[cs]=WWW prohlížeč
### in CMakeScripts/FindGLIB2.cmake: ###
# - Try to find GLib2
# Once done this will define
#
# GLIB2_FOUND - system has GLib2
# GLIB2_INCLUDE_DIRS - the GLib2 include directory
# GLIB2_LIBRARIES - Link these to use GLib2
#
# HAVE_GLIB_GREGEX_H glib has gregex.h header and
.shadowed {
/* from http://stackoverflow.com/a/12921987/252042 */
-webkit-filter: drop-shadow(12px 12px 25px rgba(0,0,0,0.5));
filter: url(#drop-shadow);
-ms-filter: "progid:DXImageTransform.Microsoft.Dropshadow(OffX=12, OffY=12,
Color='#444')";
filter: "progid:DXImageTransform.Microsoft.Dropshadow(OffX=12, OffY=12,
Color='#444')";
}
#!/bin/zsh
KEYFILE="/home/jonathan/tarsnap.key"
NAME="backup-`date +%s-%Y:%m:%d-%H:%m`"
CACHEDIR="/home/jonathan/.tarsnap-cache"
tarsnap --keyfile $KEYFILE --cachedir $CACHEDIR \
--exclude /proc/ --exclude /sys/ --exclude /dev/ --exclude /run/ \
--exclude /root/ \
--exclude /tmp/ --exclude /mnt/ --exclude /media/ --exclude /lost+found \
EDITOR DEFAULT=vim
GOROOT DEFAULT=${HOME}/go
GOOS DEFAULT=linux
GOARCH DEFAULT=amd64
GOBIN DEFAULT=${GOROOT}/bin
GOPATH DEFAULT=${HOME}/gocode
PATH DEFAULT="${HOME}/bin:${GOBIN}:${GOPATH}/bin:${PATH}"
@jyc
jyc / hosts
Created January 22, 2013 00:10
127.0.0.1 localhost.localdomain localhost localhost4.localdomain4 localhost4
# Auto-generated hostname. Please do not remove this comment.
173.245.6.163 localhost6.localdomain6 localhost6
173.245.6.163 able.putgen.com putgen.com able
173.245.6.163 icebrg.us
::1 localhost
@jyc
jyc / fstab
Last active December 10, 2015 19:19
#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
# UUID=97d9bd80-f1ba-46c4-a1f1-639509bcc133 LABEL=btrfs-root
#/dev/sda3 / btrfs rw,noatime,ssd,discard,space_cache,subvol=__active 0 1
UUID=97d9bd80-f1ba-46c4-a1f1-639509bcc133 / btrfs defaults,noatime,discard,ssd,subvol=__active,compress=lzo,autodefrag 0 0
UUID=97d9bd80-f1ba-46c4-a1f1-639509bcc133 /run/btrfs-root btrfs defaults,noatime,discard,ssd,compress=lzo,autodefrag 0 0
[Unit]
Description=Sets PowerTOP power-saving options.
[Service]
ExecStart=/home/jonathan/bin/set-powertop
[Install]
WantedBy=multi-user.target