Skip to content

Instantly share code, notes, and snippets.

@moul
moul / 100 - OSX Desktop.markdown
Last active October 3, 2015 17:07
OSX Fresh Install

How I setup my machine after a fresh install

Download and Install Applications

  1. Xcode or Command Line Tools
  2. Install Dropbox
  3. Install 1Password
  4. Download Chrome
  • Set up Filevault
/**
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@pasiaj
pasiaj / phantomjs-linkedin.js
Created July 31, 2013 19:57
A phantomjs script to: a) Login to Linkedin.com b) Scrape all your contacts c) Visit all the contacts d) Automatically endorse all contacts' skills.
var auth = {
user: "USERNAME",
pass: "PASSWORD"
};
function ParallelRunner (list, func, runners) {
function createSlots(runners) {
var slots = [];
for (var i = 0; i < runners; i++) {
slots.push( objReturner() );
@syst3mw0rm
syst3mw0rm / sources.list
Last active May 8, 2019 02:39
Ubuntu 13.10 sources.list
#############################################################
################### OFFICIAL UBUNTU REPOS ###################
#############################################################
###### Ubuntu Main Repos
deb http://in.archive.ubuntu.com/ubuntu/ saucy main restricted universe
###### Ubuntu Update Repos
deb http://in.archive.ubuntu.com/ubuntu/ saucy-security main restricted universe
deb http://in.archive.ubuntu.com/ubuntu/ saucy-updates main restricted universe
@jpetazzo
jpetazzo / README.md
Last active August 21, 2019 17:55
Give network superpowers to docker

Unionize: network superpowers for your docker containers

Unionize lets you connect together docker containers in arbitrarily complex scenarios.

Note: I recommend to use https://github.com/jpetazzo/pipework instead.

  • pipework is a better name than unionize
  • it's hosted on a "real" github repo instead of a small gist :-)

Now if you want Unionize, it's still here. Just check those examples.

@mpdaugherty
mpdaugherty / right_radios.html
Created July 7, 2012 06:23
Example of how to correctly use radio inputs with Angular JS's ng:Repeat directive
<div ng-repeat="m in milestone_choices" class="row-fluid">
<label><input type="radio" name="meaningless" value="(( $index ))" ng-model="milestone_data.index" />
&nbsp;<span ng-bind="m.title"></span></label>
</div>
@kwylez
kwylez / gist:5337918
Last active March 2, 2020 06:09
Example implementation of listening for iTunes/Spotify track changes and displaying information in the NotificationCenter. Article reference: http://blog.corywiles.com/now-playing-with-spotify-and-itunes
//
// AppDelegate.m
//
//
// Created by Cory D. Wiles on 10/8/12.
// Copyright (c) 2013 Cory D. Wiles. All rights reserved.
//
#import "AppDelegate.h"
#import "iTunes.h"
@jobsamuel
jobsamuel / cors-cloud-storage.sh
Created April 26, 2019 12:52
How to set up CORS in your Google Cloud Storage Bucket
# Go to "Activate Google Cloud Shell" in https://console.cloud.google.com/home.
echo '[{"origin": ["*"],"responseHeader": ["Content-Type"],"method": ["GET", "HEAD"],"maxAgeSeconds": 3600}]' > cors-config.json
# If you want to restrict the access one or more specific domains, add their URL to the array:
echo '[{"origin": ["https://yourdomain.com"],"responseHeader": ["Content-Type"],"method": ["GET", "HEAD"],"maxAgeSeconds": 3600}]' > cors-config.json
# Set CORS config.
gsutil cors set cors-config.json gs://YOUR_BUCKET_NAME
# Verify if everything is OK.
JedWatson/classnames (2650855 dls, 1465 stars)
yannickcr/eslint-plugin-react (2077066 dls, 710 stars)
rackt/react-router (1833204 dls, 9050 stars)
facebook/react-dom (782024 dls, 33044 stars)
gaearon/react-hot-loader (708042 dls, 3250 stars)
rackt/redux (568969 dls, 10743 stars)
rackt/react-redux (495498 dls, 1509 stars)
jsdf/coffee-react-transform (463488 dls, 380 stars)
JedWatson/react-input-autosize (455277 dls, 107 stars)
reflux/reflux (393281 dls, 4316 stars)
@duydo
duydo / elasticsearch_best_practices.txt
Last active December 15, 2021 06:12
Elasticsearch - Index best practices from Shay Banon
If you want, I can try and help with pointers as to how to improve the indexing speed you get. Its quite easy to really increase it by using some simple guidelines, for example:
- Use create in the index API (assuming you can).
- Relax the real time aspect from 1 second to something a bit higher (index.engine.robin.refresh_interval).
- Increase the indexing buffer size (indices.memory.index_buffer_size), it defaults to the value 10% which is 10% of the heap.
- Increase the number of dirty operations that trigger automatic flush (so the translog won't get really big, even though its FS based) by setting index.translog.flush_threshold (defaults to 5000).
- Increase the memory allocated to elasticsearch node. By default its 1g.
- Start with a lower replica count (even 0), and then once the bulk loading is done, increate it to the value you want it to be using the update_settings API. This will improve things as possibly less shards will be allocated to each machine.
- Increase the number of machines you have so