Skip to content

Instantly share code, notes, and snippets.

View vijayrudraraju's full-sized avatar

Vijay Rudraraju vijayrudraraju

View GitHub Profile
@justinepocock
justinepocock / a11y
Created July 27, 2016 15:46
A11y checklist for all people
## Designers
- [ ] Make sure there is enough contrast between text and its background color [More Info](http://accessibility.voxmedia.com/#designers-1)
- [ ] Don't indicate important information using color alone [More Info](http://accessibility.voxmedia.com/#designers-2)
- [ ] Pair values of colors together (not only hues) to increase contrast [More Info](http://accessibility.voxmedia.com/#designers-3)
- [ ] Design focus states to help users navigate and understand where they are [More Info](http://accessibility.voxmedia.com/#designers-5)
- [ ] Help users understand inputs, and help them avoid and correct mistakes [More Info](http://accessibility.voxmedia.com/#designers-6)
- [ ] Write good alt text for your images [More Info](http://accessibility.voxmedia.com/#designers-7)
- [ ] Be as consistent and clear as possible in layout and copy [More Info](http://accessibility.voxmedia.com/#designers-9)
## Engineers
function mergesort(xs) {
if (xs.length < 2) {
return xs
}
const n = xs.length / 2 | 0;
return merge(mergesort(xs.slice(0, n)), mergesort(xs.slice(n)));
}
function merge(xs, ys) {
@klugjo
klugjo / LinkedList.js
Last active February 16, 2020 18:21
LinkedList ES6 Implementation
class LinkedList {
constructor() {
this.head = null;
this.tail = null;
this.count = 0;
}
get length() {
return this.count;
}
@EvgenyOrekhov
EvgenyOrekhov / Docker Compose files for PHP development.md
Last active April 16, 2024 18:03
Simple Docker Compose files for PHP development

Simple Docker Compose files for PHP development

Apache + PostgreSQL + MySQL

docker-compose -f docker-compose.apache.yml up

nginx + Apache + PostgreSQL + MySQL

docker-compose -f docker-compose.nginx+apache.yml up

nginx + PHP-FPM + PostgreSQL + MySQL

docker-compose -f docker-compose.nginx+php-fpm.yml up

@taoyuan
taoyuan / npm-using-https-for-git.sh
Last active November 18, 2024 08:50
Force git to use https:// instead of git://
# npm using https for git
git config --global url."https://github.com/".insteadOf [email protected]:
git config --global url."https://".insteadOf git://
# npm using git for https
git config --global url."[email protected]:".insteadOf https://github.com/
git config --global url."git://".insteadOf https://
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@chantastic
chantastic / on-jsx.markdown
Last active November 10, 2024 13:39
JSX, a year in

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't

@laser
laser / client.js
Last active August 29, 2015 14:01
Basic Client - JavaScript (browser)
var client = Barrister.httpClient("/v1/todos");
client.loadContract(function() {
var proxy = client.proxy('TodoManager');
var properties = { 'title' : 'Call Dad', 'completed' : false };
proxy.createTodo(properties, function(err, result) {
if (err) {
console.log(JSON.stringify(err));
}
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active May 2, 2025 06:20
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@hnaohiro
hnaohiro / facebook_scraping.coffee
Last active August 17, 2018 15:22
Scrape Facebook with CasperJS
casper = require('casper').create()
casper.start "https://facebook.com", ->
query =
email: 'youremail'
pass: 'yourpass'
@fill "#login_form", query, true
casper.thenOpen 'https://facebook.com/username'