Skip to content

Instantly share code, notes, and snippets.

View louisje's full-sized avatar
💯
左手寫程式 (">_<) 右手做測試

Louis Jeng louisje

💯
左手寫程式 (">_<) 右手做測試
View GitHub Profile
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@othree
othree / COSCUP-2012-Day2-irc-log
Created August 20, 2012 07:35 — forked from afutseng/COSCUP-2012-Day2-irc-log
COSCUP 2012 Day2 irc log
--- Day changed Sun Aug 19 2012
00:01 -!- Alisha [72262a5c@gateway/web/freenode/ip.114.38.42.92] has quit [Quit: Page closed]
00:02 -!- orinx|bof is now known as orinx|sleep
00:02 -!- play [~AndChat59@111-248-106-192.dynamic.hinet.net] has joined #coscup
00:02 -!- bobchao [~bobchao@202-169-164-141.aspublic.wlan.sinica.edu.tw] has joined #coscup
00:02 -!- mode/#coscup [+o bobchao] by ChanServ
00:03 -!- play [~AndChat59@111-248-106-192.dynamic.hinet.net] has quit [Client Quit]
00:03 -!- nemu [72180666@gateway/web/freenode/ip.114.24.6.102] has joined #coscup
00:04 -!- kevin6861 [3d46d92d@gateway/web/freenode/ip.61.70.217.45] has quit []
00:06 -!- kengyu [~Keng-Yu@42.71.190.169] has joined #coscup
@magnetikonline
magnetikonline / README.md
Last active March 14, 2024 22:48
IE 7/8/9/10/11 Virtual machines from Microsoft - Linux w/VirtualBox installation notes.
@XVilka
XVilka / TrueColour.md
Last active July 9, 2024 23:28
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!

@amolkhanorkar
amolkhanorkar / PG::Error: ERROR: new encoding (UTF8) is incompatible
Last active November 29, 2023 17:57
Postgres PG::Error: ERROR: new encoding (UTF8) is incompatible
======= Prolbem =================================================================================================================
I have installed : ruby-2.0.0,postgres-9.2 , now in rails app when I execute:
rake db:create , command I get:
PG::InvalidParameterValue: ERROR: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII)
HINT: Use the same encoding as in the template database, or use template0 as template.
: CREATE DATABASE "my_db_name" ENCODING = 'unicode'.......
bin/rake:16:in `load'
@uupaa
uupaa / image.resize.in.github.flavored.markdown.md
Last active July 11, 2024 16:08
image resize in github flavored markdown.

Image source

https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png

Try resize it!

  • ![](https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png | width=100)
@iredun
iredun / youtube.txt
Created April 13, 2016 08:59
Youtube API get thumbnail image
Each YouTube video has 4 generated images. They are predictably formatted as follows:
http://img.youtube.com/vi/<insert-youtube-video-id-here>/0.jpg
http://img.youtube.com/vi/<insert-youtube-video-id-here>/1.jpg
http://img.youtube.com/vi/<insert-youtube-video-id-here>/2.jpg
http://img.youtube.com/vi/<insert-youtube-video-id-here>/3.jpg
The first one in the list is a full size image and others are thumbnail images. The default thumbnail image (ie. one of 1.jpg, 2.jpg, 3.jpg) is:
http://img.youtube.com/vi/<insert-youtube-video-id-here>/default.jpg
For the high quality version of the thumbnail use a url similar to this:
@raecoo
raecoo / console.save.js
Last active June 23, 2024 09:05
Save JSON object to file in Chrome Devtool
// e.g. console.save({hello: 'world'})
(function(console){
console.save = function(data, filename){
if(!data) {
console.error('Console.save: No data')
return;
}
if(!filename) filename = 'console.json'
if(typeof data === "object"){
data = JSON.stringify(data, undefined, 4)
@BichengLUO
BichengLUO / mp4_to_gif.bash
Created February 7, 2018 23:30
An ffmpeg script to convert MP4 to GIF with high quality
ffmpeg -y -i input.mp4 -vf fps=10,scale=716:-1:flags=lanczos,palettegen palette.png
ffmpeg -i input.mp4 -i palette.png -filter_complex "fps=10,scale=716:-1:flags=lanczos[x];[x][1:v]paletteuse" output.gif
@stramel
stramel / HOWTO.md
Last active July 19, 2024 02:38
Installing Powerline fonts on Windows 10

Installing Powerline fonts on Windows 10

Steps

  1. Download and extract zip from here
  2. Press Windows + x
  3. Press a (Selects PowerShell (Admin))
  4. Navigate to directory where fonts were extracted to (cd ${HOME}\Downloads\fonts-master\fonts-master)
  5. Set Execution Policy Set-ExecutionPolicy RemoteSigned [1]
  6. Press y then Enter to accept