Skip to content

Instantly share code, notes, and snippets.

View htfy96's full-sized avatar
🐢
WFH

Zheng Luo htfy96

🐢
WFH
View GitHub Profile
@byronhe
byronhe / modern_crypto.md
Last active March 28, 2022 07:51
现代密码学实践指南[2015年]

现代密码学实践指南[2015年]

标签(空格分隔): 密码学


本文介绍目前现代密码学的最先进技术, 前半部分主要翻译自 《Cryptographic Right Answers》,附上收集的资料,和byron个人的理解。

@eduardocardoso
eduardocardoso / gist:82a629882ddb02ab3677
Last active April 3, 2023 08:23
Script to delete exited containers and untagged/unused images from docker
#!/bin/bash
set -o errexit
echo "Removing exited docker containers..."
docker ps -a -f status=exited -q | xargs -r docker rm -v
echo "Removing dangling images..."
docker images --no-trunc -q -f dangling=true | xargs -r docker rmi
@brimston3
brimston3 / FLOW.sh
Created October 5, 2014 19:40
Linux HTB QoS script with source-based prioritization.
#!/bin/sh
# Bandwidth flow controller. Should decrease overall latency.
: <<'EOF'
Copyright (C) February 30, 2006, Andrew Domaszek
(MIT License)
Update history:
May 30, 2014 - add internal flow limit
@obihann
obihann / .nethackrc
Last active November 21, 2020 17:03
NetHack Config
OPTIONS=showexp,showscore,time,color,!autopickup,pickup_burden:unencumbered
OPTIONS=pickup_types:$?!/(+
OPTIONS=autodig,fruit:slime mold,boulder:0
OPTIONS=number_pad:2
OPTIONS=suppress_alert:3.4.3
MSGTYPE=hide "You displaced *." # pet displacement
OPTIONS=statuscolors
STATUSCOLOR=hp%100=green,hp%66=yellow,hp%50=orange
@thoop
thoop / nginx.conf
Last active April 14, 2025 17:11
Official prerender.io nginx.conf for nginx
# Change YOUR_TOKEN to your prerender token
# Change example.com (server_name) to your website url
# Change /path/to/your/root to the correct value
server {
listen 80;
server_name example.com;
root /path/to/your/root;
index index.html;
@chmouel
chmouel / git-branch-cleanup.sh
Last active September 14, 2022 15:56
Delete merged gerrit git branch using Change-ID
#!/bin/zsh
declare -a unmerged
git rev-parse --show-toplevel 2>/dev/null >/dev/null || { echo "Not a git dir"; exit 1 ;}
git fetch origin;
git branch --merged|grep -v 'master'|xargs git branch -d
for branch in $( git branch --no-merged );do
@mgedmin
mgedmin / strace_process_tree.py
Last active January 13, 2021 15:02
Tool to help me make sense out of `strace -f` output.
in/python
# -*- coding: UTF-8 -*-
"""
Usage:
strace-process-tree filename
Read strace -f output and produce a process tree.
Recommended strace options for best results:
@jareware
jareware / SCSS.md
Last active April 11, 2025 18:25
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

@raskasa
raskasa / utility-functions.prolog
Created December 14, 2012 03:23
All useful Prolog functions learned over the course of the semester in CS 341 - Programming Languages.
% Contained within are all the useful Prolog functions learned in CS 341 this past semester (Fall 2012).
% NOTE: Any functions used that are not defined in this file are built-in functions.
% length(+As,-N)
% returns in N the length of the list As
length([],0).
length([A|As],N) :- length(As,M), N is M+1.
% append(+As,+Bs,-Cs)
% returns in Cs the append of lists As and Bs
@skyscribe
skyscribe / .gdbinit
Created October 30, 2012 03:04
GDB init file to print STL containers and data members
#
# STL GDB evaluators/views/utilities - 1.03
#
# The new GDB commands:
# are entirely non instrumental
# do not depend on any "inline"(s) - e.g. size(), [], etc
# are extremely tolerant to debugger settings
#
# This file should be "included" in .gdbinit as following:
# source stl-views.gdb or just paste it into your .gdbinit file