Skip to content

Instantly share code, notes, and snippets.

View kakipo's full-sized avatar
💪
Let's get physical

K kakipo

💪
Let's get physical
View GitHub Profile
@t2
t2 / sidekiq.config
Created February 11, 2015 20:25
Sidekiq on AWS ElasticBeanstalk (64bit Amazon Linux 2014.09 v1.1.0 running Ruby 2.1 (Puma))
# Original: http://www.snip2code.com/Snippet/256399/Amazon-Elastic-Beanstalk-Sidekiq
commands:
create_post_dir:
command: "mkdir /opt/elasticbeanstalk/hooks/appdeploy/post"
ignoreErrors: true
files:
"/etc/rsyslog.d/11-sidekiq.conf":
mode: '000644'
content: |
EB_CONFIG_APP_LOGS=$(/opt/elasticbeanstalk/bin/get-config container -k app_log_dir)
@bobbygrace
bobbygrace / trello-css-guide.md
Last active April 22, 2024 10:15
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

@hidakatsuya
hidakatsuya / class-based-implementation.md
Last active August 29, 2015 14:04
Thinreports の新しい API を考える

クラスベースの実装

Generator API が使いにくい問題の解決策として、クラスベースの実装方法を考える。 なお、クラスベースでの利用は Generator の当初の設計思想に含まれているが、現状ではいろいろ足りていない。

注意: 下記コードは、実装の提案のためのものであり、実際に動作するものではない。

Report 定義

@gcarrion-gfrmedia
gcarrion-gfrmedia / 0000_packages.config
Created April 29, 2014 10:49
AWS Elastic Beanstalk Ruby 2.0/Puma Environment - .ebextensions tweaks and Sidekiq configuration. This is known to work fine with AWS Elastic Beanstalk 's 64bit Amazon Linux 2014.03 v1.0.1 running Ruby 2.0 (Puma) stack. Later stack versions might not work, but for that specific version works fine.
# Install Git needed for Git based gems
packages:
yum:
git: []
@miyamoto-daisuke
miyamoto-daisuke / vpc-knowhow-2014-04.template
Last active October 20, 2020 07:02
VPC knownhow 2014-04
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "VPC knowhow template",
"Parameters": {
"KeyName": {
"Description": "Name of an existing EC2 KeyPair to enable SSH access to the instances",
"Type": "String",
"MinLength": "1",
"MaxLength": "64",
"AllowedPattern": "[-_ a-zA-Z0-9]*",
@voluntas
voluntas / shiguredo.rst
Last active March 31, 2024 02:15
時雨堂コトハジメ
@jessecurry
jessecurry / paperclip_migration.rake
Created August 13, 2013 21:51
Rake task for migrating paperclip attachments stored on S3 when you have to change your path.
namespace :paperclip_migration do
desc 'Migrate data'
task :migrate_s3 => :environment do
# Make sure that all of the models have been loaded so any attachments are registered
puts 'Loading models...'
Dir[Rails.root.join('app', 'models', '**/*')].each { |file| File.basename(file, '.rb').camelize.constantize }
# Iterate through all of the registered attachments
puts 'Migrating attachments...'
@mochiz
mochiz / gist:4736183
Last active April 16, 2023 03:56
rbenvとruby-buildでRuby環境を最新に保つ

rbenvとruby-buildでRuby環境を最新に保つ

更新日:2014/11/19

rbenv, ruby-buildを更新

$ cd ~/.rbenv
$ git pull origin master
$ cd ~/.rbenv/plugins/ruby-build
$ git pull origin master
@toretore
toretore / README
Created April 9, 2011 23:23
Facebook Canvas apps, CSRF protection & session cookies
Facebook Canvas apps are loaded like this:
* User clicks link to app or tab ("page as tab")
* An iframe is inserted which loads content from the FB server (NOT yours, yet)
Something along the lines of:
<iframe src="http://facebook.com/page_proxy.php?appid=123">
* The FB server returns some HTML & JS with an automatically submitting form:
<form id="humbaba" target="http://you.com/facebook">
<input type="hidden" name="signed_request"/></form>
@jittuu
jittuu / gist:792715
Created January 24, 2011 02:19
Test Omniauth Facebook Callback Controllers in Devise with rspec
require 'spec_helper'
describe Users::OauthCallbacksController, "handle facebook authentication callback" do
describe "#annonymous user" do
context "when facebook email doesn't exist in the system" do
before(:each) do
stub_env_for_omniauth
get :facebook