Skip to content

Instantly share code, notes, and snippets.

View aug2uag's full-sized avatar

Reza Fatahi aug2uag

  • Los Angeles, CA
View GitHub Profile
#!/usr/bin/env ruby
require 'rubygems'
require 'ruby_odata'
svc = OData::Service.new "http://odata.netflix.com/Catalog/"
puts "DVD:"
svc.Titles.filter("AverageRating le 2 and Type eq 'Movie' and Dvd/Available eq true").order_by("AverageRating asc").top(100)
movies = svc.execute
#pragma tableview datasource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return 0;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
#!/usr/bin/env bash
# generate git log array in JSON:
git log \
--pretty=format:'{%n "commit": "%H",%n "author": "%an <%ae>",%n "date": "%ad",%n "message": "%f"%n},' \
$@ | \
perl -pe 'BEGIN{print "["}; END{print "]\n"}' | \
perl -pe 's/},]/}]/' > logAcc.json
@aug2uag
aug2uag / gist:5a0a5e8da2395ace75b2
Last active September 3, 2015 04:00 — forked from Steven-Rose/gist:3943830
VI: Select all + delete, select all + copy
Select all and delete (actually move to buffer)
:%d
Select all and copy to buffer
:%y
Use p to paste the buffer.
/*globals define*/
define(function(require) {
'use strict';
// import dependencies
var Engine = require('famous/core/Engine');
var Surface = require('famous/core/Surface');
var ScrollView = require('famous/views/ScrollView');
var ImageSurface = require('famous/surfaces/ImageSurface');
var StateModifier = require('famous/modifiers/StateModifier');
var RenderNode = require('famous/core/RenderNode');
@aug2uag
aug2uag / index
Last active December 6, 2015 12:10 — forked from mrsonord/index
Html head snippet with everything you would generally use.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<meta name='DC.title' content=''>
<meta name='subtitle' content='This is my subtitle'>
<meta name='url' content=''>
<meta name='identifier-URL' content=''>
<meta name='reply-to' content='email@mail.com'>
@aug2uag
aug2uag / uber.yaml
Created February 21, 2016 20:49 — forked from earth2marsh/uber.yaml
A Swagger YAML specification for Uber's new API
swagger: 2
info:
title: The new Uber API
description: Move your app forward with the Uber API
version: "1.0.0"
host: api.uber.com
schemes:
- https
basePath: /v1
produces:
#!/bin/bash
PHANTOM_JS="phantomjs-1.9.8-linux-x86_64"
if [[ $EUID -ne 0 ]]; then
echo "You must be a root user" 2>&1
exit 1
else
apt-get update
apt-get install -y build-essential chrpath libssl-dev libxft-dev
apt-get install -y libfreetype6 libfreetype6-dev
apt-get install -y libfontconfig1 libfontconfig1-dev
@aug2uag
aug2uag / nginx.conf
Last active December 10, 2017 08:33 — forked from Unitech/nginx.conf
NGINX/PM2
worker_processes auto;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
@aug2uag
aug2uag / .gitlab-ci.yml
Created July 17, 2018 16:33 — forked from thornbill/.gitlab-ci.yml
Example Node GitLab CI Yamlfile
# Official framework image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/node/tags/
image: node:6
before_script:
- npm install
# This folder is cached between builds
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
cache: