Skip to content

Instantly share code, notes, and snippets.

@mattiaslundberg
mattiaslundberg / arch-linux-install
Last active March 29, 2024 08:38
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swedish keymap
@subfuzion
subfuzion / curl.md
Last active April 26, 2024 09:43
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@lionello
lionello / pinyinmap.js
Last active October 22, 2016 18:25
`convertToPinYinSearch` converts text into ascii string with first PinYin letter for each Chinese character for autocomplete
var a='a',b='b',c='c',d='d',e='e',f='f',g='g',h='h',i='i',j='j',k='k',l='l',m='m',n='n',o='o',p='p',q='q',r='r',s='s',t='t',u='u',v='v',w='w',x='x',y='y',z='z';
var pinyinmap={a:a,b:b,c:c,d:d,e:e,f:f,g:g,h:h,i:i,j:j,k:k,l:l,m:m,n:n,o:o,p:p,q:q,r:r,s:s,t:t,u:u,v:v,w:w,x:x,y:y,z:z,
的:d,一:y,是:s,在:z,人:r,有:y,不:b,国:g,这:z,了:l,中:z,和:h,为:w,们:m,他:t,我:w,个:g,以:y,大:d,上:s,地:d,要:y,会:[h,k],对:d,时:s,到:d,于:y,来:l,生:s,能:n,年:n,可:k,而:e,行:[h,x],出:c,发:f,用:y,作:z,种:z,就:j,法:f,所:s,成:c,学:x,自:z,经:j,方:f,之:z,理:l,定:d,也:y,部:b,说:s,分:f,家:j,同:t,主:z,其:q,后:h,动:d,过:g,多:d,现:x,进:j,得:d,本:b,如:r,业:y,民:m,者:z,下:x,事:s,实:s,工:g,当:d,性:x,因:y,些:x,机:j,与:y,它:t,力:l,产:c,日:r,关:g,政:z,公:g,第:d,使:s,然:r,物:w,面:m,由:y,体:t,制:z,那:n,或:h,但:d,全:q,都:d,应:y,从:[c,z],子:z,前:q,意:y,利:l,开:k,军:j,并:b,重:[c,z],合:[h,g],此:c,样:y,美:m,十:s,将:j,加:j,无:w,外:w,化:h,新:x,最:z,高:g,里:l,明:m,长:[c,z],起:q,等:d,相:x,还:h,代:d,战:z,度:d,间:j,文:w,你:n,道:d,正:z,内:n,表:b,三:s,果:g,天:t,特:t,情:q,心:x,问:w,着:z,没:m,及:j,月:y,系:x,资:z,被:b,只:[q,z],提:[d,t],论:l,已:y,通:t,二:e,斯:s,义:y,务:w,任:r,建:j,题:t,员:y,教:j,好:h,各:g,世:s,西:x,点:d,量:l,数:s,向:x,市:s,么:[
@matsubo
matsubo / rails.yml
Last active March 22, 2017 15:45
configuration for tmuxinator rails project
# ~/.tmuxinator/rails.yml
name: rails_project
root: ~/Documents/rails_repository/
# Optional tmux socket
socket_name: rails
# Runs before everything. Use it to start daemons etc.
# pre: sudo /etc/rc.d/mysqld start
@wlib
wlib / LICENSE
Last active June 10, 2022 22:14
Run a shell script with bash, line-by-line, prompted on each command. Useful for running unknown scripts or debugging. Not a secure substitute for understanding a script beforehand.
MIT License
Copyright (c) 2021 Daniel Ethridge
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: