Skip to content

Instantly share code, notes, and snippets.

View kaylarose's full-sized avatar

Kayla Rose kaylarose

View GitHub Profile
@kaylarose
kaylarose / cobblestone.sh
Last active August 29, 2015 14:09
Cobblestone: Bootstrap a Mac for Hacking & Development
#!/bin/bash
# Cobblestone: Bootstrap a Mac for Hacking & Development
# Cobble together a decent Mac Developer setup from scratch
# Author: Kayla Hinz
# LICENSE: MIT
#
# TODO:
# ANSI-Fun!
@brucecoddington
brucecoddington / resources.js
Last active June 27, 2020 14:42
Wrapping $resource with api and data services.
angular.module('app.resources', ['ngResource'])
.factory('api', function ($resource) {
var api = {
defaultConfig : {id: '@id'},
extraMethods: {
'update' : {
method: 'PUT'
}
@cgiacomi
cgiacomi / passport.js
Last active February 20, 2018 05:05
BearerStrategy using a JWT token
/*
* Bearer strategy for token authentication when accessing API endpoints
*/
passport.use(new BearerStrategy(
function(token, done){
try {
//we attempt to decode the token the user sends with his requests
var decoded = jwt.decode(token, tokenSecret);
//TODO: must check the token expiry and ensure the token is still valid
@DenTelezhkin
DenTelezhkin / README.md
Last active July 11, 2016 09:19
CI Rakefile for iOS applications.Prerequisites: xcpretty, shenzhen, cocoapods, testflight, XCTest.Put this Rakefile into directory with your .xcodeproj and run rake. Remove build tasks you don't need in your setup.

Usage

Install dependencies and run tests

rake 

Dependencies, tests, archive in Release configuration and upload to TestFlight

rake testflight 
@ivanacostarubio
ivanacostarubio / Dockerfile
Created October 18, 2013 17:16
Sample Dockerfile
# Ruby 1.9 using ruby-ni
#
# VERSION 0.0.1
#
FROM base
MAINTAINER Ivan Acosta-Rubio "ivan@softwarecriollo.com"
ADD https://gist.github.com/ivanacostarubio/9309be8a79a94aafd02d/raw/8e84fac50a57a23f191eccf5e41bae4ecde80873/gistfile1.txt /etc/resolv.conf
# Installing basic stuf: wget, git, ruby
@kaylarose
kaylarose / notes
Last active December 24, 2015 18:19
Cocoapods Cheatsheet
# Cocoapods Notes
## For XCode 5 Dev Preview on Mavericks
If your dynamic frameworks in the Pods project are getting linked to OSX Frameworks instead of iOS, you can try reverting to an earlier version of Cocoapods (0.24.0)
- This is more of an XCode UI bug, than a real build problem, but at this point in time there is no work around in Cocoapods. Original Source: https://github.com/CocoaPods/CocoaPods/issues/1420#issuecomment-25561488
@lucacioria
lucacioria / domains_api_tutorial.markdown
Last active December 21, 2015 10:29
Google+ Domains API with Service Accounts (Quick Start Tutorial in Python on App Engine)

Google+ Domains API - Quick Start

introduction

Google+ Domains API are meant to interact with your G+ accounts in the domain. With these APIs you can manage circles, read and write posts, shares, and comments etc.. more informations here

This tutorial is for creating an application that uses the Domains API, running on Google App Engine with python.

create GAE (Google App Engine) app

@brandonb927
brandonb927 / osx-for-hackers.sh
Last active May 14, 2024 18:00
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@aheckmann
aheckmann / emit.js
Created June 7, 2012 15:25
mongoose update,new,remove events
var mongoose = require('mongoose');
mongoose.connect('localhost', 'testing_emitUpdate');
var Schema = mongoose.Schema;
var schema = new Schema({
name: String
});
// plumbing
schema.pre('save', function (next) {
@rstacruz
rstacruz / index.md
Last active November 3, 2023 09:56
Rails models cheatsheet

Rails Models

Generating models

$ rails g model User

Associations

belongs_to

has_one