Skip to content

Instantly share code, notes, and snippets.

View fuzzyalej's full-sized avatar
🎯
Focusing

Alejandro Andrés fuzzyalej

🎯
Focusing
View GitHub Profile
@adrianseeley
adrianseeley / gnn.iris.js
Last active November 9, 2017 06:42
Code Used To Generate: Neural Genetic Adaptation of the Iris Dataset (GATO-2014)
function gnn (cases, wide, tall, population, iterations, error_fn, error_thresh) {
var inputs = cases[0][0].length;
var outputs = cases[0][1].length;
// declare net, provide input layer
var net = [new Array(inputs)];
// create input neurons in input layer
for (var i = 0; i < inputs; i++)
net[0][i] = {output: 0}
// create hidden layers
for (var x = 0; x < wide; x++) {
@jaimeiniesta
jaimeiniesta / rails_jobs.txt
Last active November 15, 2018 09:15
Resources to find a job as a Rails developer
The following is a list of places where you can find job offers as a Rails developer:
https://twitter.com/currofile
https://twitter.com/domestikaempleo #spain only
http://www.workingwithrails.com/
https://weworkremotely.com/jobs/search?term=rails
https://jobs.github.com/
http://trabajosrails.com/ # spain only
http://www.indeed.com/q-Ruby-On-Rails-Developer-jobs.html
@hemanth
hemanth / devtool.bash
Created November 23, 2013 06:31
Hacking Chrome DevTools Setup
#!/usr/bin/env bash
# Setup script for hacking chrome devtools
# Source -> https://medium.com/p/8c8896f5cef3
echo "Creating folder and initialize a git repo"
mkdir devtools-frontend && cd devtools-frontend
git init
echo "Adding chromium remote and initialize sparse checkout"
git remote add upstream https://chromium.googlesource.com/chromium/blink
@javisantana
javisantana / api.md
Last active December 22, 2015 03:49
this is a small API documentation template for your projects

Library or whatever title

Here what the library can do for other people

dead simple code example

API definition

@afeld
afeld / gist:5201086
Last active August 17, 2023 18:43
job boards
@ngpestelos
ngpestelos / rbenv-1.9.3-p385.sh
Last active December 14, 2015 03:08
Install rbenv 1.9.3-p385-perf
#!/bin/bash
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.profile
echo 'eval "$(rbenv init -)"' >> ~/.profile
source ~/.profile
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
RUBY_CONFIGURE_OPTS=--with-openssl-dir="/usr/local/openssl"
@postmodern
postmodern / rails_rce.rb
Last active March 5, 2025 00:46
Proof-of-Concept exploit for Rails Remote Code Execution (CVE-2013-0156)
#!/usr/bin/env ruby
#
# Proof-of-Concept exploit for Rails Remote Code Execution (CVE-2013-0156)
#
# ## Advisory
#
# https://groups.google.com/forum/#!topic/rubyonrails-security/61bkgvnSGTQ/discussion
#
# ## Caveats
#
@philfreo
philfreo / file_upload.js
Last active September 18, 2017 15:45
Backbone-Forms File Upload Editor
// directly uploads to S3
// See http://philfreo.com/blog/how-to-allow-direct-file-uploads-from-javascript-to-amazon-s3-signed-by-python/
// See https://github.com/elasticsales/s3upload-coffee-javascript
editors.Filepicker = editors.Text.extend({
tagName: 'div',
events: {
'change input[type=file]': 'uploadFile',
@fxn
fxn / top_ten_instantiated_classes.rb
Created February 9, 2012 10:32
Top ten instantiated classes by instance count on Ruby 1.9.3 startup (MRI)
classes = Hash.new(0)
ObjectSpace.each_object do |object|
classes[object.class] += 1
end
top_ten = classes.values.uniq.sort.reverse[9]
classes.select {|_, c| c >= top_ten}.sort_by {|_, c| -c}.each do |klass, c|
puts "#{klass}: #{c}"
end
@rossnelson
rossnelson / Rails 3 Environment
Last active September 29, 2015 08:48 — forked from laserlemon/Rails 3 Environment
Snow Leopard, Homebrew, Git, RVM, Ruby, Passenger, Apache, MySQL and ImageMagick
# 2012-01-07
#
# Mac OS X 10.6.8
# Homebrew 0.7
# Xcode 3.2.4
# Git 1.7.3.1
# RVM 1.0.12
# Ruby 1.9.2, 1.8.7
# Rails 3.0.0
# Passenger 3.0.0.pre4