Skip to content

Instantly share code, notes, and snippets.

Avatar
🥃
whiskey and C++

aesophor

🥃
whiskey and C++
View GitHub Profile
View haha
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-
def get_total(x, y, z):
return 25 * x + 30 * y + 20 * z
def get_leftover(money, x, y, z):
return money - get_total(x, y, z)
def maybe_show(money, x, y, z):
@aesophor
aesophor / game.py
Last active Apr 21, 2021
五子棋 OAO
View game.py
#!/usr/bin/env python3
# --*-- encoding: utf-8 --*--
import sys
import random
# 常數
empty = 0
player = 1
computer = 2
@aesophor
aesophor / opcodes.sh
Created Dec 18, 2020 — forked from mirchr/opcodes.sh
bash one-liner for converting binary object file to shellcode ( i didn't write this)
View opcodes.sh
for i in $(objdump -d shell.o -M intel |grep "^ " |cut -f2); do echo -n '\x'$i; done;echo
@aesophor
aesophor / remove-firefox-sound-tab.scss
Last active Dec 3, 2020 — forked from superbiche/remove-firefox-sound-tab.scss
Disable sound indicator icons in Firefox pinned tabs
View remove-firefox-sound-tab.scss
Paste this fucking shit into userChrome.css
```
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
.tabbrowser-tab[pinned] :-moz-any(.tab-icon-overlay[soundplaying]) {
display: none !important;
}
```
View three_pipes.cpp
extern "C" {
#include <sys/wait.h>
#include <unistd.h>
}
#include <iostream>
#include <string>
#include <vector>
int main() {
int pipes[2][2];
@aesophor
aesophor / palenight.js
Last active Apr 30, 2021 — forked from ggamel/palenight.js
Material Palenight Color Scheme for Blink Shell
View palenight.js
// Material Palenight Color Scheme for Blink Shell
// by Greg Gamel (https://github.com/ggamel) (https://greg.is)
black = '#292d3e';
red = '#f07178'; // red
green = '#c3e88d'; // green
yellow = '#ffcb6b'; // yellow
blue = '#82aaff'; // blue
magenta = '#c792ea'; // pink
cyan = '#89ddff'; // cyan
@aesophor
aesophor / README.md
Created Feb 24, 2019 — forked from hofmannsven/README.md
My simply Git Cheatsheet