Skip to content

Instantly share code, notes, and snippets.

View aesophor's full-sized avatar
💜

aesophor aesophor

💜
View GitHub Profile
@aesophor
aesophor / README.md
Created February 24, 2019 01:11 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@aesophor
aesophor / palenight.js
Last active August 31, 2021 13:32 — forked from ggamel/palenight.js
Material Palenight Color Scheme for Blink Shell
// 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 / three_pipes.cpp
Created October 20, 2020 14:12
three pipes
extern "C" {
#include <sys/wait.h>
#include <unistd.h>
}
#include <iostream>
#include <string>
#include <vector>
int main() {
int pipes[2][2];
@aesophor
aesophor / remove-firefox-sound-tab.scss
Last active December 3, 2020 15:49 — forked from superbiche/remove-firefox-sound-tab.scss
Disable sound indicator icons in Firefox pinned tabs
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;
}
```
@aesophor
aesophor / opcodes.sh
Created December 18, 2020 05:03 — forked from mirchr/opcodes.sh
bash one-liner for converting binary object file to shellcode ( i didn't write this)
for i in $(objdump -d shell.o -M intel |grep "^ " |cut -f2); do echo -n '\x'$i; done;echo
@aesophor
aesophor / game.py
Last active April 21, 2021 02:43
五子棋 OAO
#!/usr/bin/env python3
# --*-- encoding: utf-8 --*--
import sys
import random
# 常數
empty = 0
player = 1
computer = 2
#!/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 / gen.sh
Created July 19, 2022 02:35
Generate n dummy files in testdir.
#!/usr/bin/env bash
if [ $# -lt 1 ]; then
echo "usage: $0 <nr_test_files>"
exit 0
fi
rm -rf testdir
mkdir -p testdir
@aesophor
aesophor / gomock.md
Created November 3, 2022 02:09 — forked from thiagozs/gomock.md
Tutorial gomock

08/16/17 by  Sergey Grebenshchikov

No Comments

This is a quick tutorial on how to test code using the GoMock mocking library and the standard library testing package testing.

GoMock is a mock framework for Go. It enjoys a somewhat official status as part of the github.com/golang organization, integrates well with the built-in testing package, and provides a flexible expectation API.