Skip to content

Instantly share code, notes, and snippets.

View aurieh's full-sized avatar

auri aurieh

View GitHub Profile
@quchen
quchen / trolling_haskell
Last active November 12, 2024 00:10
Trolling #haskell
13:15 <xQuasar> | HASKELL IS FOR FUCKIN FAGGOTS. YOU'RE ALL A BUNCH OF
| FUCKIN PUSSIES
13:15 <xQuasar> | JAVASCRIPT FOR LIFE FAGS
13:16 <luite> | hello
13:16 <ChongLi> | somebody has a mental illness!
13:16 <merijn> | Wow...I suddenly see the error of my ways and feel
| compelled to write Node.js!
13:16 <genisage> | hi
13:16 <luite> | you might be pleased to learn that you can compile
| haskell to javascript now
@Aatch
Aatch / syscalls.rs
Last active December 19, 2017 13:14
x86-64 syscalls in rust, using asm!
#[inline(always)]
unsafe fn syscall0(n: int) -> int {
let mut ret : int = 0;
asm!("syscall" : "={rax}"(ret) : "{rax}"(n) : "rcx", "r11", "memory" : "volatile");
return ret;
}
#[inline(always)]
@choucavalier
choucavalier / vim-hybrid termite colorscheme
Last active July 19, 2017 13:21
vim-hybrid colorscheme for termite
# Vim-hybrid colorscheme for termite
# see https://github.com/w0ng/vim-hybrid
[colors]
foreground = #C5C8C6
foreground_bold = #D9D9D9
foreground_dim = #ADADAD
background = #1D1F21
cursor = #D9D9D9
@elliotchance
elliotchance / example.go
Last active October 22, 2024 12:46
Capturing grouping for regex function replace in Go
func main() {
str := "abc foo:bar def baz:qux ghi"
re := regexp.MustCompile("([a-z]+):([a-z]+)")
result := ReplaceAllStringSubmatchFunc(re, str, func(groups []string) string {
return groups[1] + "." + groups[2]
})
fmt.Printf("'%s'\n", result)
}
from math import sqrt, cos, sin, pi, radians
from glc import Gif
from glc.color import Color
from glc.utils import draw_image
from cairo import ImageSurface
def intersection(x, y, rx, ry):
px, py = 0, 0
if x == 0:
py = -ry if y < 0 else ry
@takanuva
takanuva / Free.hs
Last active March 21, 2018 22:03
Test with Free monads
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE FlexibleContexts #-}
import Control.Monad
import Control.Monad.Trans.Free
import Control.Monad.Trans.Class
--------------------------------------------------
@TomFaulkner
TomFaulkner / ubuntu18.04-vfio.md
Last active February 3, 2024 15:28
VFIO Setup on Ubuntu 18.04
@ZipFile
ZipFile / README.md
Last active November 12, 2024 11:47
Pixiv OAuth Flow

Retrieving Auth Token

  1. Run the command:

    python pixiv_auth.py login

    This will open the browser with Pixiv login page.