Skip to content

Instantly share code, notes, and snippets.

🕶

0xADADA 0xadada

🕶
Block or report user

Report or block 0xadada

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@0xadada
0xadada / vim-cheatsheet.md
Last active Oct 8, 2019
VIM movement, keyboard commands and shortcuts
View vim-cheatsheet.md
@0xadada
0xadada / principals-of-writing-good-css
Created Oct 25, 2012
Principals of writing good css
View principals-of-writing-good-css
General High-Order Principles
* Simplicity - The most bug-free line of code is the one you don't have to write!
* Reusable - Create code that is portable to other sections of the site and are nestable.
* Extensible - Create code that lends itself to be easily extended and with low selector specificity to promote extensibility.
* One-to-many - Create classes that can be applied to many contexts.
* Fast - Know your selector performance basics, reduce HTTP requests.
* Semantic - Create CSS that speaks to the task or meaning that is being accomplished. Good CSS class names describe our HTML elements in very semantic and specific ways.
* Standards Oriented - Create portable, standards-forward code.
* Future Proof - Create code as if you'll never be able to edit it again.
@0xadada
0xadada / console.log
Created Nov 14, 2012
javascript console logging protection
View console.log
// Avoid 'console' errors in browsers that lack a console.
( function() {
var method;
var noop = function noop() {};
var methods = [
'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
'timeStamp', 'trace', 'warn'
];
@0xadada
0xadada / screen_resolution_matrix.txt
Created Dec 5, 2012
iOS Mobile device resolution matrix
View screen_resolution_matrix.txt
Device : Hardware : (-statusbar) : simulated (-statusbar)
iPhone : 320 x 480 : 320 x 460 : -
iPhone (Retina) : 640 x 960 : 640 x 920 : 320 x 460
iPhone 5 : 640 x 1136 : 640 x 1096 : 320 x 548
@0xadada
0xadada / webchef.txt
Last active Aug 29, 2015
Frontend development is like hosting a dinner party
View webchef.txt
Backend development is like cooking dinner for yourself at home. You get to setup your kitchen/dev environment how you like, and the constraints are well-know and can be easily controlled for. You get to pick the ingredients and cook them however you like; as long as it comes out well.
Frontend development is like cooking for a dinner party of 100. The design team picks the dish to be cooked. You're cooking a fancy roast with a pasta side dish and salad and cheese to start, but 4% of your guests are vegetarian (ie8) and 2% gluten-free. 1% are blind vegans (web crawlers).
The problem we need to solve is how to deliver the best experience to our variety of guests.
Do we want to serve the same meal to every guest? Than we cannot serve meat or pasta or cheese. We will be forced to constrain the menu of possibility to the lowest common denominator.
Do we want to cook for the meat eaters (optimal experience), and cook a separate meal for our vegetarian guests(mobile)? This way we can optimize the experience f
@0xadada
0xadada / grep-sex.txt
Created Mar 11, 2014
Grep for string in files and replace with sed
View grep-sex.txt
grep -rli 'SignupLightbox' app/controller/website/ | xargs sed -i "" 's/SignupLightbox/SemLightbox/g'
@0xadada
0xadada / gist:d222369f31f7af7b21f5
Last active Aug 29, 2015
Some important points from the "Fuck off Google" talk by The Invisible Committee at #31c3
View gist:d222369f31f7af7b21f5
http://media.ccc.de/browse/congress/2014/31c3_-_6459_-_en_-_saal_2_-_201412281900_-_the_invisible_committee_returns_with_fuck_off_google_-_anonymous_member_of_tarnac_solidarity_committee_-_tarnac_nine.html#video&t=2398
Cybernetics
an ideology of how the internet constructs a new reality.
claude shannon
von neumann
a world where all forms of politics are controlled by machines, in a
network of self-regulating systems.
an ontology where all life can be flattened as pure messages of
information.
@0xadada
0xadada / sum.js
Last active Oct 21, 2018
A chained invocable, n-argument, sum function in javascript
View sum.js
/* This discussion was started on Reddit about a job interview question:
* Question: How would you make this work?
* add(2, 5); // 7
* add(2)(5); // 7
* url: https://www.reddit.com/r/javascript/comments/2t6riw/a_frontend_developer_interview_question_thats/cnxhnow/
*/
/**
* sum Returns the sums of N arguments.
*
View keybase.md

Keybase proof

I hereby claim:

  • I am 0xadada on github.
  • I am 0xadada (https://keybase.io/0xadada) on keybase.
  • I have a public key whose fingerprint is 6989 0464 9D36 B7B8 7E0C 5A48 6BBE 9BB1 1965 6CA4

To claim this, I am signing this object:

@0xadada
0xadada / FizzBuzz.js
Last active Nov 14, 2015
FizzBuzz Javascript Solution - Bodyless for loop
View FizzBuzz.js
// Concise
var f='Fizz', b='Buzz', i=0, d3, d5;
for (i; ++i <= 100; d3 = !(i % 3), d5 = !(i % 5), console.log(d3 ? d5 ? f+b : f : d5 ? b : i));
// Multi-line, commented
var /* Declare our variables outside the loop, a performance best-practice */
f='Fizz', /* Variable `f` so we don't repeat 'Fizz' twice - DRY */
b='Buzz', /* Variable `b` so we don't repeat 'Buzz' twice - DRY */
i=0, /* For-loop counter, start at 0 */
d3, /* setup a variable for checking divisibility by 3 */
You can’t perform that action at this time.