Skip to content

Instantly share code, notes, and snippets.

View tadassce's full-sized avatar
✌️

Tadas Ščerbinskas tadassce

✌️
View GitHub Profile
# Rails production setup via SQLite3 made durable by https://litestream.io/
# Copy this to Dockerfile on a fresh rails app. Deploy to fly.io or any other container engine.
#
# try locally: docker build . -t rails && docker run -p3000:3000 -it rails
#
# in production you might want to map /data to somewhere on the host,
# but you don't have to!
#
FROM ruby:3.0.2
@minac
minac / recommendationsforportugal.md
Last active March 26, 2019 11:05
Recommendations for Portugal

Recommendations for Portugal

Carly and I are fortunate enough to know people from different parts of the World. Since Portugal and specifically Porto became famous in the tourist circuit we keep getting asked for recommendations, so we joined together a bunch of things we had written to different friends and make it a blog post so that it's easily shareable. We hope it is useful for you. If you like it then (shameless plug), consider coming on one of our food tours in Porto to get to know the local culture through food and wine with amazing guides.

DISCLAIMER: This is Carly and Miguel's research and opinion, not Taste Porto's, nor any formal guidebooks. Different people think and prefer different things, so proceed as you will.

Portugal sea and surf

The sea/ocean off the western coast of Portugal is cold year round, the Atlantic has no warm currents here, and there is a frequent nortada (north wind) which makes swimming quite cold. The positive side of it is that

@vasanthk
vasanthk / System Design.md
Last active July 24, 2024 23:02
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
#! /bin/sh
set -e
if [ -z $1 ];
then
echo "USAGE: share-image <image>"
exit 1
fi
@MarioRicalde
MarioRicalde / sshd_config.sh
Created July 25, 2014 23:08
SSH config that is password less – the file for OSX is located in `/private/etc/sshd_config` – then restart ssh with `sudo killall ssh-agent`.
# $OpenBSD: sshd_config,v 1.89 2013/02/06 00:20:42 dtucker Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options override the
def god_mode
Object.class_eval do
def method_missing(m, *args, &block)
if private_methods.include?(m)
send(m, *args, &block)
else
super
end
end
end
@henrik
henrik / README.md
Last active January 14, 2017 20:31
Mail notes to self with Alfred.app, a Ruby script and Gmail. Inspired by Captio: http://boonbits.com/captio/

Save the Ruby script in ~/.bin/note_to_self.rb. Configure it, install the gems it uses.

Add an Alfred extension manually as described below.

Alfred 3

Use the "Keyword to Script to Notification" template; use the below as your script.

Keyword: note | [x] with space | Argument Required

@AndrewRadev
AndrewRadev / ack-gems
Created December 20, 2012 14:15
Use 'ack' to search through all the gems in the project. Call with "bundle exec ack-gems".
#! /usr/bin/env ruby
require 'bundler'
paths = Bundler.load.specs.map(&:full_gem_path)
system("ack '#{ARGV[0]}' #{paths.join(' ')}")