Skip to content

Instantly share code, notes, and snippets.

View danrabinowitz's full-sized avatar
☁️
Building the cloud

Dan Rabinowitz danrabinowitz

☁️
Building the cloud
View GitHub Profile
@PieterScheffers
PieterScheffers / start_docker_registry.bash
Last active October 29, 2023 18:26
Start docker registry with letsencrypt certificates (Linux Ubuntu)
#!/usr/bin/env bash
# install docker
# https://docs.docker.com/engine/installation/linux/ubuntulinux/
# install docker-compose
# https://docs.docker.com/compose/install/
# install letsencrypt
# https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04
@ryane
ryane / five_minutes.yml
Created February 24, 2015 15:15
five_minutes.yml
---
- hosts: all
vars:
UBUNTU_COMMON_ROOT_PASSWORD: 'xxxxx'
UBUNTU_COMMON_DEPLOY_PASSWORD: 'xxxxx'
UBUNTU_COMMON_LOGWATCH_EMAIL: user@example.com
ubuntu_common_deploy_user_name: deploy
ubuntu_common_deploy_public_keys:
- ~/.ssh/id_rsa.pub
@ubermajestix
ubermajestix / vpnconnect
Created December 9, 2013 20:56
This script allows you to open your vpn connection by launching an application. I use it to connect to a vpn from Alfred (you could use Quicksilver or LaunchBar too). In Automator, search for the "Run AppleScript" action. Double click it and copy and paste the code below. Change your vpn's name on line 3. Then export to your Applications folder …
tell application "System Events"
tell current location of network preferences
set VPNservice to service "yourVPN"
if exists VPNservice then set isConnected to connected of current configuration of VPNservice
if isConnected is false then
connect VPNservice
else
disconnect VPNservice
end if
end tell
@3dd13
3dd13 / row_is_cut_in_the_middle_solution.rb
Created February 18, 2011 07:49
overflow / page break examples of Prawn Pdf generation.
# gem "prawn", "0.8.4"
# Sometime there is no enough space for the last table row when it reaches the end of page
Prawn::Document.generate("text_group_overflow_question.pdf") do |pdf|
add_page_break_if_overflow(pdf) do |pdf|
# generating table here
# ...
end
end