Skip to content

Instantly share code, notes, and snippets.

View johndel's full-sized avatar
🖖

John Deliyiannis johndel

🖖
View GitHub Profile
@jferris
jferris / configmap.yaml
Last active July 4, 2024 09:52
Rails Kubernetes Manifests
apiVersion: v1
kind: ConfigMap
metadata:
name: example
namespace: default
data:
APPLICATION_HOST: example.com
LANG: en_US.UTF-8
PIDFILE: /tmp/server.pid
PORT: "3000"
@dhh
dhh / Gemfile
Created June 24, 2020 22:23
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active August 9, 2024 20:18
What I Wish I'd Known About Equity Before Joining A Unicorn

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

Elections are coming up in Greece. I wish we could get closer to liquid
democracy.
Democracy in Greece started as direct democracy – where anyone* could vote
directly for any issue put forth. Anyone was also allowed to raise a point
publicly.
With the invention of modern countries in which politics are more large-scale,
direct democracy became infeasible as the population was too large to be able to
practically vote for every issue, so the world invented representative democracy
@Geokoumpa
Geokoumpa / gist:11365481
Created April 28, 2014 08:30
Ember-model findMany implementation
# this calls to a resource collection path adding an 'ids' param with comma separated ids, e.g. /posts?ids="1,2,3"
Ember.RESTAdapter.reopen findMany: (klass, records) ->
url = @buildURL(klass)
params = ids: records._ids.join(",")
@ajax(url, params).then (data) ->
collectionKey = Ember.get(klass, "collectionKey")
dataToLoad = (if collectionKey then Ember.get(data, collectionKey) else data)
@emad-elsaid
emad-elsaid / facebook-group-hall-of-fame.rb
Created March 20, 2014 12:11
Facebook group hall of fame script
#!/usr/bin/env ruby
require 'koala' # gem install koala --no-document
require 'psych'
# create a facebook app and get access token from here
# https://developers.facebook.com/tools/explorer
# select "user_groups" when authenticating
oauth_access_token = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
group_name = 'Egyptian Geeks'
posts_limit = 100
graph = Koala::Facebook::API.new(oauth_access_token)
@emad-elsaid
emad-elsaid / worm.rb
Created March 19, 2014 12:15
Worm game in under 50 line of code in ruby
#!/usr/bin/env ruby
require 'gosu' # gem install gosu --no-document
include Gosu
$dimension, $splits = 200, 20
$size = $dimension.to_f / $splits.to_f
class Worm
attr_writer :dir
def initialize() reset end
@skmp
skmp / Console based injection.js
Last active December 31, 2015 05:49
Summaries by using my fork of textteaser!
// Open the debug tools
// load the function using
// This requires the target site to have jquery loaded as $
$('<script src="https://rawgithub.com/skmp/textteaser/master/tease.js"></script>').appendTo('body');
//Use directly from console
//(replace with proper selectors for your page)
tease($('.title-selector').text(), $('.content-selector').text())
@meesterdude
meesterdude / README.md
Last active March 23, 2017 17:42
emoji_spec is a microgem to put emoji in your rspec output.

Emoji Spec

results Tired of the same, dull rspec output? liven it up with some emoji!

Below are the sets presently available, and their corresponding id. if you don't set an ID, one will be randomly chosen every run. Emoji icons may not render in certain terminals.

(pass, fail, pending)

emoji

Security is Hard

Massive Assignment

  • watch for ActiveRecord Relation, like has_many, has_many :through
  • watch for user_roles, `group_users
  • UPDATE action

Admin