Skip to content

Instantly share code, notes, and snippets.

@guiambros
guiambros / cloud-init.sh
Created October 22, 2012 01:29
Cloud-Init.sh - Amazon EC2 initial instance setup script (tested with Ubuntu 12.04 LTS)
#!/bin/bash
function getpublickey()
{
x=$(curl -fs http://169.254.169.254/latest/meta-data/public-keys/)
if [ $? -eq 0 ]; then
for i in $x; do
index=$(echo $i|cut -d = -f 1)
format=$(curl -s http://169.254.169.254/latest/meta-data/public-keys/$index/)
echo $(curl -s http://169.254.169.254/latest/meta-data/public-keys/$index/$format)
@guiambros
guiambros / gist:4187670
Created December 2, 2012 08:03
Synology DS212+ Serial Console Boot
__ __ _ _
| \/ | __ _ _ ____ _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| | | | (_| | | \ V / __/ | |
|_| |_|\__,_|_| \_/ \___|_|_|
_ _ ____ _
| | | | | __ ) ___ ___ | |_
| | | |___| _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
\___/ |____/ \___/ \___/ \__| ** LOADER **
@guiambros
guiambros / correct_password.c
Created December 8, 2012 21:51
Synology's password
/* vi: set sw=4 ts=4: */
/*
* Copyright 1989 - 1991, Julianne Frances Haugh <jockgrrl@austin.rr.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
@guiambros
guiambros / ssh -vv
Created December 16, 2012 21:24
sshd debug
$ ssh -vv joeuser@localhost
OpenSSH_5.8p1-hpn13v11, OpenSSL 1.0.1c-fips 10 May 2012
debug2: ssh_connect: needpriv 0
debug1: Connecting to localhost [127.0.0.1] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: identity file /root/.ssh/id_dsa-cert type -1
@guiambros
guiambros / gist:4582745
Created January 21, 2013 00:13
openSSH-5.8p1 - Makefile
# $Id: Makefile.in,v 1.1 2011-04-06 00:47:31 jimlin Exp $
# uncomment if you run a non bourne compatable shell. Ie. csh
#SHELL = /bin/sh
# Modified Makefile for Synology's openssh-5.8p1
#
# source code: http://sourceforge.net/projects/dsgpl/
# v2636 branch: http://sourceforge.net/projects/dsgpl/files/Synology%20NAS%20GPL%20Source/2636branch/
<!-- copy this to YOUR_THEME.tmTheme-->
<dict>
<key>name</key>
<string>diff: deleted</string>
<key>scope</key>
<string>markup.deleted</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#EAE3CA</string>
@guiambros
guiambros / README.md
Created October 12, 2013 18:07 — forked from nikcub/README.md

Keybase proof

I hereby claim:

  • I am guiambros on github.
  • I am guiambros (https://keybase.io/guiambros) on keybase.
  • I have a public key whose fingerprint is CF84 6914 DD14 8321 395D 2304 DF2C DE44 DB08 BC8F

To claim this, I am signing this object:

@guiambros
guiambros / .XCompose
Last active September 26, 2022 18:15
.XCompose
#-#-#-#-#-#-#-#
# ~/.XCompose
# To change the US International keyboard layout to behave like the
# Microsoft Windows (TM) version of the layout
# version: 0.2 edit 6 (20110403-6)
# by @tamh [48bytes at gmail com]
#
# Released under LGPL v2.1. Please refer to it by going to:
# <http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html>