Skip to content

Instantly share code, notes, and snippets.

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

Louis Jeng louisje

💯
左手寫程式 (">_<) 右手做測試
View GitHub Profile
@sontek
sontek / snowjob.sh
Last active May 5, 2025 11:13
Make your terminal snow
#!/bin/bash
LINES=$(tput lines)
COLUMNS=$(tput cols)
declare -A snowflakes
declare -A lastflakes
clear
@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 [[email protected]] has joined #coscup
00:02 -!- bobchao [[email protected]] has joined #coscup
00:02 -!- mode/#coscup [+o bobchao] by ChanServ
00:03 -!- play [[email protected]] 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 [[email protected]] has joined #coscup
@magnetikonline
magnetikonline / README.md
Last active February 7, 2025 07:27
IE 7/8/9/10/11 Virtual machines from Microsoft - Linux w/VirtualBox installation notes.
@XVilka
XVilka / TrueColour.md
Last active April 27, 2025 10:17
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 August 30, 2024 13:31
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'
@girst
girst / asciiplayer
Last active July 8, 2025 09:45
PornHub ASCII Player
#!/bin/bash
#PornHub ASCII player 1.0
#Copyright Tobias Girstmair
#Licenced under GPLv3 (GNU Public Licence)
#iSticktoit.net
#Do not remove this notice
progName="PornHub / YouPorn ASCII Player v1.0"
playMode=0 # 0=vlc, 1=vlc new window, 2=mplayer, 3=mplayer new window
logFile=/dev/null
@uupaa
uupaa / image.resize.in.github.flavored.markdown.md
Last active July 4, 2025 07:01
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 11, 2025 12:28
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)