Skip to content

Instantly share code, notes, and snippets.

@benwaffle
benwaffle / UI.vala
Created March 27, 2016 04:52
identicon
void draw_rect (Cairo.Context context, double x, double y, double width, double height, Gdk.RGBA color) {
context.set_source_rgba (color.red, color.green, color.blue, color.alpha);
context.rectangle (x, y, width, height);
context.fill ();
}
int parse_base16 (string? s) {
if (s == null)
return 0;
int res;
s.scanf ("%x", out res);
@eevee
eevee / fonts.conf.xml
Last active September 5, 2022 03:42
my fonts.conf
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<dir>~/.fonts</dir>
<alias>
<family>serif</family>
<prefer>
<family>Source Serif Pro</family>
<family>IPAMincho</family>
</prefer>
@ZipFile
ZipFile / Pixiv Public API.yaml
Last active August 7, 2022 14:11
Unofficial API specification extracted from Pixiv Android App
swagger: "2.0"
info:
title: "Pixiv Public API"
description: "Unofficial API specification extracted from Pixiv Android App v4.8.2"
version: "1.0"
host: public-api.secure.pixiv.net
schemes:
- https
basePath: /v1
produces:
@tomzx
tomzx / gist:7f79141f423927789475
Last active August 23, 2017 21:06 — forked from sartak/a.md
Anki database notes
-- cards are what you review. easy!
CREATE TABLE cards (
id integer primary key,
-- the epoch milliseconds of when the card was created
nid integer not null,
-- notes.id
did integer not null,
-- deck id (available in col table)
ord integer not null,
-- ordinal, seems like. for when a model has multiple templates, or thereabouts
<svg preserveAspectRatio="xMinYMin" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 560 1388">
<defs>
<mask id="canTopMask">
<image width="560" height="1388" xlink:href="img/can-top-alpha.png"></image>
</mask>
</defs>
<image mask="url(#canTopMask)" id="canTop" width="560" height="1388" xlink:href="can-top.jpg"></image>
</svg>
@shime
shime / _readme.md
Last active November 8, 2020 08:54 — forked from ryin/tmux_local_install.sh
installation script for tmux 1.9a

Having trouble installing the latest stable version of tmux?

I know, official package for your OS/distro is outdated and you just want the newest version of tmux.

Well, this script should save you some time with that.

Prerequisities

  • gcc
@adamloving
adamloving / temporary-email-address-domains
Last active May 31, 2024 15:43
A list of domains for disposable and temporary email addresses. Useful for filtering your email list to increase open rates (sending email to these domains likely will not be opened).
0-mail.com
0815.ru
0clickemail.com
0wnd.net
0wnd.org
10minutemail.com
20minutemail.com
2prong.com
30minutemail.com
3d-painting.com
@sartak
sartak / a.md
Last active June 26, 2024 04:59
Anki 2 annotated schema
@zealot128
zealot128 / podcast-download.sh
Created July 18, 2012 15:46
Download Media Podcasts (RSS-Feed with audio/Video in enclosure)
#!/bin/bash
# Run with podcast-download.sh http://linktofeed.xml
# should work in BusyBox (my NAS is an ARM Linux with busybox)
set -e # exit when one line has error
filename="/tmp/rssdwn-$(date +%s)"
curl $1 2> /dev/null | grep enclosure | sed "s/.*\(http[^\"\?]*\).*/\1/" > $filename
echo "Found $(wc -l $filename) Links, start downloading to pwd"