Skip to content

Instantly share code, notes, and snippets.

Avatar
🧪
why has the new github hidden statuses?

Qais Patankar qaisjp

🧪
why has the new github hidden statuses?
View GitHub Profile
@scaryguy
scaryguy / change_primary_key.md
Last active Mar 1, 2021
How to change PRIMARY KEY of an existing PostgreSQL table?
View change_primary_key.md
-- Firstly, remove PRIMARY KEY attribute of former PRIMARY KEY
ALTER TABLE <table_name> DROP CONSTRAINT <table_name>_pkey;
-- Then change column name of  your PRIMARY KEY and PRIMARY KEY candidates properly.
ALTER TABLE <table_name> RENAME COLUMN <primary_key_candidate> TO id;
@nikcub
nikcub / README.md
Created Oct 4, 2012
Facebook PHP Source Code from August 2007
View README.md
@mabako
mabako / decode.lua
Created Jun 28, 2012
lua &#8364; thing, unicode(like utf16)->utf8
View decode.lua
:gsub("&#%d%d%d%d;", decode)
function decode(str)
local num = tonumber(str:sub(3,6))
local first = math.floor(num/4096)
num = num - 4096 * first
return string.char(first+224, math.floor(num/64)+128, num%64+128)
end
@jambu
jambu / gmail-scrollbars.css
Created Mar 9, 2012 — forked from Cifro/gmail-scrollbars.css
New Gmail like scrollbars for webkit browsers
View gmail-scrollbars.css
/* Gmail style scrollbar */
::-webkit-scrollbar {
width: 12px
}
::-webkit-scrollbar-thumb {
border-width: 1px 1px 1px 2px
}
::-webkit-scrollbar-track {
border-width: 0
}