Skip to content

Instantly share code, notes, and snippets.

View cyang-el's full-sized avatar
💭
I may be slow to respond.

C.H. Yang cyang-el

💭
I may be slow to respond.
  • Berlin
View GitHub Profile
@cyang-el
cyang-el / cpp-dev-env-flake.nix
Created February 18, 2024 23:05 — forked from fufexan/cpp-dev-env-flake.nix
C/C++ dev environment in Nix, using Clang
{
description = "C/C++ environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, utils, ... }@inputs:
utils.lib.eachDefaultSystem (
# my poetry #serial_number_is_a_concept_irreleant_to_me_atm
#
# 01:02 am Sep 25th 2021
# he/him
# Person from Taipei, Taiwan @Berlin, Germany
#
# This is poetry, not prod code.
# BACK OFF!!! coding cops
#
# This whole thing can be beta-or-alpha reduced (or whatever it's called)
@cyang-el
cyang-el / LearnGoIn5mins.md
Created January 5, 2021 20:33 — forked from prologic/LearnGoIn5mins.md
Learn Go in ~5mins
@cyang-el
cyang-el / web-servers.md
Created November 16, 2020 16:14 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@cyang-el
cyang-el / nixos.md
Created October 25, 2020 12:39 — forked from martijnvermaat/nixos.md
Installation of NixOS with encrypted root

Keybase proof

I hereby claim:

  • I am cyang-el on github.
  • I am cyang_el (https://keybase.io/cyang_el) on keybase.
  • I have a public key ASDVZ3dFXrnNxObMa4iDo8hV48KmSYU4Y7UO_e0tDHmy9Ao

To claim this, I am signing this object:

@cyang-el
cyang-el / Makefile
Created August 30, 2019 14:44 — forked from cooldaemon/Makefile
libxml2 sax sample.
xml2_sax_sample: xml2_sax_sample.c
gcc -o xml2_sax_sample `xml2-config --cflags --libs` xml2_sax_sample.c
clean:
rm xml2_sax_sample
@cyang-el
cyang-el / .gitconfig
Created December 4, 2018 14:04 — forked from mattkasa/.gitconfig
GIT Aliases: git st/git stat (git status), git ci (check-in or git commit), git co (git checkout), git br (git branch), git ls (git ls-files), git undo (undo last unpushed commit), git cdiff (commit diff, diff of unpushed commits), git ldiff (last diff, diff of last two HEAD refs, eg. use after a pull to see what was pulled), git pstat and git p…
[alias]
st = status
stat = status
ci = commit
co = checkout
br = branch
ls = ls-files
undo = reset --soft HEAD^
merge = merge --no-commit
cdiff = diff --cached
@cyang-el
cyang-el / ipython_notebook_in_git.md
Created February 2, 2017 16:52 — forked from pbugnion/ ipython_notebook_in_git.md
Keeping IPython notebooks under Git version control

This gist lets you keep IPython notebooks in git repositories. It tells git to ignore prompt numbers and program outputs when checking that a file has changed.

To use the script, follow the instructions given in the script's docstring.

For further details, read this blogpost.

The procedure outlined here is inspired by this answer on Stack Overflow.

@cyang-el
cyang-el / tox.ini
Created August 28, 2016 08:46 — forked from danverbraganza/tox.ini
My standard tox.ini file that allows you to run coverage, lettuce, nosetests and lint, and to pick out a given feature or a module for nosetest (So that you don't have to run the whole suite)
[tox]
envlist=py27,lint
[testenv]
downloadcache={homedir}/.pipcache
distribute=True
sitepackages=False
[testenv:py27]
deps=nose