Skip to content

Instantly share code, notes, and snippets.

View MaxPleaner's full-sized avatar

Max Pleaner MaxPleaner

View GitHub Profile
Create VPC
Create Security Group
Create incoming and outgoing rules for SSH, HTTP, Sinatra and Rackup, 443
Create Key Pair
cd ~/.ssh
mv ~/Downloads/Turing.pem .
chmod 400 Turing.pem
ssh-add -k Turing.pem
Launch Instance
ubuntu 14.04
@nraychaudhuri
nraychaudhuri / backpressure
Created August 6, 2014 18:08
back pressure
I try to put things into the larger perspective here, so prepare, long mail.
== Defining backpressure
First of all, we need a working definition of "backpressure". I put it in quotes since I will attack things from a very general perspective which might not exactly match what others think as backpressure.
Sometimes it is easier to characterize the correct behavior of a system/protocol by defining what we consider incorrect behavior rather than trying to limit ourselves when approaching from correctness properties. In the case of backpressure there are two undesireable kinds of behavior:
- If the buffers in the system might growth without bounds then the backpressure protocol is not safe
- If the protocol can become stuck, although the sender has messages to deliver and the receiver is also available to process them, then the backpressure protocol is not safe
@Joseph-N
Joseph-N / _message.html.erb
Last active April 15, 2021 11:09
Tutorial code snippets for chat application in rails. Tutorial link http://goo.gl/l3e8zN
<li class="<%= self_or_other(message) %>">
<div class="avatar">
<img src="http://placehold.it/50x50" />
</div>
<div class="chatboxmessagecontent">
<p><%= message.body %></p>
<time datetime="<%= message.created_at %>" title="<%= message.created_at.strftime("%d %b %Y at %I:%M%p") %>">
<%= message_interlocutor(message).name %> • <%= message.created_at.strftime("%H:%M %p") %>
</time>
</div>
@staltz
staltz / introrx.md
Last active May 15, 2025 10:37
The introduction to Reactive Programming you've been missing
@hamxiaoz
hamxiaoz / meteor_crud_basic.coffee
Last active February 8, 2019 12:58
Meteor CRUD form with AutoForm: tab and editor style
# jade
template(name='productNumbersCrud')
h4 Product Numbers
.row
.col-md-6
table.tabel.table-hover.table-striped.table-bordered
tbody
each productNumbers
tr
td
@ecerulm
ecerulm / Gemfile
Last active January 23, 2020 05:47
Minimal config for sinatra / guard / livereload
# A sample Gemfile
source "https://rubygems.org"
# gem "rails"
gem 'sinatra'
group :development, :test do
gem 'guard-livereload', require: false
gem 'rack-livereload'
gem 'guard'
end
@ndarville
ndarville / webm.md
Last active March 11, 2025 17:21
4chan’s guide to converting GIF to WebM - https://boards.4chan.org/g/res/41212767

Grab ffmpeg from https://www.ffmpeg.org/download.html

It's a command line tool which means you will have to type things with your keyboard instead of clicking on buttons.

The most trivial operation would be converting gifs:

ffmpeg -i your_gif.gif -c:v libvpx -crf 12 -b:v 500K output.webm
  • -crf values can go from 4 to 63. Lower values mean better quality.
  • -b:v is the maximum allowed bitrate. Higher means better quality.
@lfender6445
lfender6445 / gist:9919357
Last active May 13, 2025 16:00
Pry Cheat Sheet

Pry Cheat Sheet

Command Line

  • pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)
  • pry -r ./config/environment.rb - load your rails into a pry session

Debugger

@wbroek
wbroek / genymotionwithplay.txt
Last active February 13, 2025 09:37
Genymotion with Google Play Services for ARM
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
@AhmedElSharkasy
AhmedElSharkasy / best_practices
Last active March 17, 2025 21:12
Rails 3 AntiPatterns, Useful snippets and Recommended Refactoring. Note: Some of them are collected from different online resources/posts/blogs with some tweaks.
Rails as it has never been before :)
Rails 3 AntiPatterns, Useful snippets and Recommended Refactoring.
Note: Some of them are collected from different online resources/posts/blogs with some tweaks.