Skip to content

Instantly share code, notes, and snippets.

View ryngonzalez's full-sized avatar

✨ Kathryn Gonzalez ✨ ryngonzalez

View GitHub Profile
@aaronpowell
aaronpowell / gist:9085724
Created February 19, 2014 03:47
AngularJS macros in Sweet.js
let module = macro {
case {_
$name
import $params (,) ...
} => {
letstx $name_str = [makeValue(unwrapSyntax(#{$name}), #{here})];
return #{
angular.module($name_str, [$params (,) ...])
};
}
@jacklynrose
jacklynrose / RubyMotionTheRailsWay.md
Last active August 29, 2015 13:57
Ideas on how to write RubyMotion apps the "Rails" way

RubyMotion The "Rails" Way

This is a current proposal that I'd like your feedback on for how we can clean up how we write RubyMotion applications. It's purely conceptual at the moment, and there would have to be some framework development to make this work the way described here.

Please submit your feedback, as a joint effort we can clean up our RubyMotion applications and make it easier for Rails developers to expand their skills into RubyMotion development.

Goals

The main points of this are:

@gsingh93
gsingh93 / heartbleed.py
Last active August 29, 2015 13:58
OpenSSL Heartbleed Exploit
#!/usr/bin/python2
import sys
import select
import socket
import struct
port = 443
TLS_ALERT = 21
@vonkohorn
vonkohorn / README.md
Created May 2, 2014 19:58
aapl 2014 04-29

README is empty

@mikaa123
mikaa123 / gist:a9380af5cd1d56a387ce
Created June 1, 2014 18:32
Simple Api implementation
var express = require('express'),
app = express();
var bodyParser = require('body-parser');
app.use(bodyParser());
var makeResource = require('catnap').makeResource;
// This simulates our datastore.
var users = [{
extension Int {
func bottlesOfBeer() {
let bottles = "\(self) bottle" + (self == 1 ? "" : "s")
let what = " of beer on the wall"
println("\(bottles + what), \(bottles) of beer.")
print("Take one down, pass it around, ")
if self == 1 {
println("no more bottles\(what).")

...

Read this first: Server setup and provisioning sucks donkey dick. Ansible sucks even more donkey dick. However, it sucks less donkey dick than any other tools out there for this god-forsaken fuck-fest they call "dev-ops". So let's use Ansible.

...

@ed-lea
ed-lea / app.coffee
Created August 12, 2015 16:27
modify a value passed in to the extended Layer class
class Main extends Layer
constructor: (options={}) ->
# override Layer default
options.width ?= 200
# introduce the scaling factor
# Using Nexus 5 @3x by default
options.finalScale ?= 3
namespace :db do
desc "load data from csv"
task :load_csv_data => :environment do
require 'fastercsv'
FasterCSV.foreach("importdata/tarife.csv", :headers => true, :col_sep => ',') do |row|
Anbieter.find_or_create_by_name(
:name => row['Anbieter_Name']
:hotline => row['Hotline'],
:email => row['Email']
@jh3
jh3 / Capfile
Created November 1, 2010 18:29
An example Capfile for drupal-deploy
require 'rubygems'
require 'drupal-deploy'
load File.join(File.dirname(__FILE__), 'config', 'lib', 'deploy')
# The name of your Drupal site
set :application, "sandbox"
# The user that will own the files directory
set :web_user, "apache"