Skip to content

Instantly share code, notes, and snippets.

View yurenchen000's full-sized avatar
😶‍🌫️
may be slow to respond.

yurenchen000

😶‍🌫️
may be slow to respond.
View GitHub Profile
@cyfdecyf
cyfdecyf / Makefile
Created September 11, 2015 01:53
Test get and set pipe/fifo buffer size.
pipe-size: pipe-size.o
$(CC) $< -o $@
@XVilka
XVilka / TrueColour.md
Last active April 8, 2024 14:02
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@liuyix
liuyix / make_ext4fs-parameters.md
Created September 2, 2013 03:16
android make_ext4fs parameters

make_ext4fs -l 512M -s -a system system.img ./system

  • -l partition size
  • -s sparse mode 压缩模式,将image文件压缩
  • -a system mount point make_ext4fs会根据private/android_filesystem_config.h里定义好的权限来给文件夹里的所有文件重新设置权限
  • ./system file directory
@tetsuok
tetsuok / printStruct.go
Created February 13, 2013 07:50
Printing structs; convert structs to JSON format easily.
// Printing structs.
// http://research.swtch.com/gotour
package main
import (
"encoding/json"
"fmt"
"log"
)
/*
* Simple MD5 implementation
*
* Compile with: gcc -o md5 -O3 -lm md5.c
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
@kwharrigan
kwharrigan / md5_test.c
Created April 15, 2012 03:22
Use openssl to produce an md5 hash of a file
#include <openssl/md5.h>
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char**argv)
{
FILE *fh;
long filesize;
unsigned char *buf;
@fnando
fnando / dev.conf
Created July 23, 2011 09:00
Nginx configuration for SSH tunnel
upstream tunnel {
server 127.0.0.1:3000;
}
server {
listen 80;
server_name dev.codeplane.com br.dev.codeplane.com;
location / {
proxy_set_header X-Real-IP $remote_addr;
@mtigas
mtigas / gist:952344
Last active April 3, 2024 07:57
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.


Updated Apr 5 2019:

because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.

some other notes: