Skip to content

Instantly share code, notes, and snippets.

View qaisjp's full-sized avatar
🧪
why has the new github hidden statuses?

Qais Patankar qaisjp

🧪
why has the new github hidden statuses?
View GitHub Profile
@jambu
jambu / gmail-scrollbars.css
Created March 9, 2012 02:17 — forked from Cifro/gmail-scrollbars.css
New Gmail like scrollbars for webkit browsers
/* Gmail style scrollbar */
::-webkit-scrollbar {
width: 12px
}
::-webkit-scrollbar-thumb {
border-width: 1px 1px 1px 2px
}
::-webkit-scrollbar-track {
border-width: 0
}
@mabako
mabako / decode.lua
Created June 28, 2012 18:37
lua € thing, unicode(like utf16)->utf8
: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
@nikcub
nikcub / README.md
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007
@scaryguy
scaryguy / change_primary_key.md
Last active April 8, 2024 14:23
How to change PRIMARY KEY of an existing PostgreSQL table?
-- 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;
@datagrok
datagrok / vendoring.md
Last active November 3, 2023 17:37
"Vendoring" is a vile anti-pattern

"Vendoring" is a vile anti-pattern

What is "vendoring"?

From a comment on StackOverflow:

Vendoring is the moving of all 3rd party items such as plugins, gems and even rails into the /vendor directory. This is one method for ensuring that all files are deployed to the production server the same as the dev environment.

The activity described above, on its own, is fine. It merely describes the deployment location for various resources in an application.

@tiimgreen
tiimgreen / app.rb
Created April 12, 2014 16:59
A simple Ruby program.
puts 'Hello World'
import Foundation
extension String
{
var length: Int {
get {
return countElements(self)
}
}
@dufferzafar
dufferzafar / allah-and-gsoc-irc-chat.txt
Last active May 18, 2020 18:50
"Allah & GSoC" - an excerpt from #gsoc IRC channel.
[6:48 pm] <Guest25582> http://oortr.com/YmU5NT
[6:48 pm] <valorie> rather than pasting a random link, why not say what it is, Guest25582?
[6:48 pm] <Guest25582> Allah is doing
[6:48 pm] <Guest25582> sun is not doing Allah is doing
[6:48 pm] <Guest25582> moon is not doing Allah is doing
[6:48 pm] <meflin> this channel is about GSOC
[6:48 pm] <Guest25582> stars are not doing Allah is doing
[6:48 pm] <valorie> please stay on topic or leave, Guest25582
[6:48 pm] <Guest25582> planets are not doing Allah is doing
[6:48 pm] <valorie> pfff
# use zsh instead of bash
case $- in
*i*)
if [ $(which zsh 2>/dev/null) ]; then
export SHELL=$(which zsh)
export BASH=""
exec zsh
fi
esac
@kiran
kiran / impact.md
Last active July 3, 2023 20:46
on impact

Requiring ICs to demonstrate business impact for promotion is, at best, imprecise, and, at worst, disingenuous. Instead, two more valuable and precise measures are:

  1. measuring project management & technical skills (can the engineer effectively/efficiently complete large, unscoped projects?), and
  2. evaluating the engineer's contribution to the team's roadmap (can the engineer identify high-value projects within the team's responsibilities? do they push their team to evaluate the prioritization of their work?)

Engineering ICs cannot plan to affect business impact in a foolproof way -- even if an IC had the means to evaluate the impact of their project, it's rare that they are empowered to select projects. Impactful projects are driven partly by luck: whether the project was timely/actually important, whether you get assigned that project, and whether you are given the resources to make the project successful. The influence of luck on impact often pushes engineers to do short-term/unrisky work, when long-te