Skip to content

Instantly share code, notes, and snippets.

View jahan-paisley's full-sized avatar
🌠
Working on lovely stuff

Jahan Zinedine jahan-paisley

🌠
Working on lovely stuff
View GitHub Profile
@jonmaim
jonmaim / qs.js
Created December 8, 2012 10:51
Generate query string for angular.js
/* Converts an object into a key/value par with an optional prefix. Used for converting objects to a query string */
var qs = function(obj, prefix){
var str = [];
for (var p in obj) {
var k = prefix ? prefix + "[" + p + "]" : p,
v = obj[k];
str.push(angular.isObject(v) ? qs(v, k) : (k) + "=" + encodeURIComponent(v));
}
return str.join("&");
}
@ychubachi
ychubachi / rails32init.md
Last active December 11, 2015 15:28 — forked from samnang/rails31init.md
Rails 3.2 with Haml, Simple Form, Bootstrap, Rspec, Cucumber, Factory Girl, Database Cleaner, Spork, and Guard

Install Rails 3.2.11 and Bundler (2013-01-24)

gem install rails bundler

Generate new app, skipping Test::Unit file generation

rails new my_app -T --skip-bundle

Set up Gemfile

@axeda
axeda / HttpBuilderTimeouts.groovy
Last active June 28, 2022 19:08
Connection Timeouts with HttpBuilder
import groovyx.net.http.HTTPBuilder
import static groovyx.net.http.ContentType.*
import static groovyx.net.http.Method.*
int TENSECONDS = 10*1000;
int THIRTYSECONDS = 30*1000;
HTTPBuilder builder = new HTTPBuilder('http://www.axeda.com')
//HTTPBuilder has no direct methods to add timeouts. We have to add them to the HttpParams of the underlying HttpClient

Ruby Infrastructure Engineer, San Francisco, California

Hi, I'm Ben. I'm the lead engineer of the infrastructure team at Zendesk.

I'm looking for a passionate and talented ruby engineer to join our infrastructure team in San Francisco. Who are we? We are the hackers behind the scenes -- we build the services and struts that the rest of Zendesk builds good product on top of. We like solving hard problems, fixing deep bugs, and doing it at scale. We'll try out new technologies, but love technology that delivers on its promises. We feel confident when we press the enter key. We're a team of good generalists who like learning the stack well enough to be considered a specialist.

Some of what we've been up to recently.

@umegaya
umegaya / gist:8131387
Last active January 9, 2022 12:46
about celluloid (ruby)
## celluloid?
- ruby library for concurrent programming
- https://github.com/celluloid/celluloid
## how it seems to be executed?
- include Celluloid module to your class
- instance of such a class is unit of concurrently executing.
- any method call through instance.async.method_call is queued as message and executed by
- fiber
- thread
@nissoh
nissoh / ng-grid-rtl.js
Last active January 4, 2016 11:09
ng-grid rtl
/***********************************************
* ng-grid JavaScript Library
* Authors: https://github.com/angular-ui/ng-grid/blob/master/README.md
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
* Compiled At: 07/06/2013 13:50
***********************************************/
(function(window, $) {
'use strict';
// the # of rows we want to add to the top and bottom of the rendered grid rows
var EXCESS_ROWS = 6;
@bzerangue
bzerangue / _verify-repair-permissions-disk.md
Last active April 30, 2025 12:39
Mac OS X Utilities via Terminal: (Verify and Repair: Disk Permissions AND Disk / Software Update / TimeMachine)

Verify and Repair Disk Permissions via Terminal (Mac OS X)

Verify Permissions

diskutil verifyPermissions /

Repair Permissions

diskutil repairPermissions /

@psayre23
psayre23 / gist:c30a821239f4818b0709
Last active March 31, 2025 12:58
Runtime Complexity of Java Collections
Below are the Big O performance of common functions of different Java Collections.
List | Add | Remove | Get | Contains | Next | Data Structure
---------------------|------|--------|------|----------|------|---------------
ArrayList | O(1) | O(n) | O(1) | O(n) | O(1) | Array
LinkedList | O(1) | O(1) | O(n) | O(n) | O(1) | Linked List
CopyOnWriteArrayList | O(n) | O(n) | O(1) | O(n) | O(1) | Array

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@norio-nomura
norio-nomura / Setup transparent proxy with VMware Fusion.md
Last active April 3, 2023 06:59
Setup transparent proxy with VMware Fusion

Setup transparent proxy with VMware Fusion

  1. Add network (vmnet3) to VMware Fusion
    1. sudo vi /Library/Preferences/VMware\ Fusion/networking
       answer VNET_1_HOSTONLY_SUBNET 172.16.92.0
       answer VNET_1_VIRTUAL_ADAPTER yes
       answer VNET_1_VIRTUAL_ADAPTER_ADDR 172.16.92.1
      +answer VNET_3_DHCP yes
      +answer VNET_3_DHCP_PARAM_DNS_ADDR 172.16.12.1
      +answer VNET_3_DHCP_PARAM_ROUTERS 172.16.12.1