Skip to content

Instantly share code, notes, and snippets.

View axilleas's full-sized avatar
🏠
Working from home

Achilleas Pipinellis axilleas

🏠
Working from home
View GitHub Profile
@jakeonrails
jakeonrails / Ruby Notepad Bookmarklet
Created January 29, 2013 18:08
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
@wilbowma
wilbowma / jail.pl
Last active August 1, 2022 11:16
A perl script to create nginx chroot in arch linux.
#a/usr/bin/perl
# This script was hastily cobbled together for my own use. It can
# probably break your system. Use at your own risk.
$JAIL = "/srv/http";
$USER = "http";
$GROUP = "http";
$WWW_DIR = "www";
sub run{
@elgalu
elgalu / metaprogramming_ruby_quiz.rb
Created December 6, 2012 04:00
My quiz on: Metaprogramming Ruby: Program Like the Ruby Pros by Paolo Perrotta
- Returns?
module Module
def const_missing(name)
"sorry i don't have #{name} yet"
end
end
Untitled #=> ?
Monkeys #=> ?
=>
You get `TypeError: Module is not a module` before reaching Untitled code
@olivierlacan
olivierlacan / gist:4062929
Last active March 12, 2025 04:27 — forked from Gregg/gist:968534
Code School Screencasting Framework

Screencasting Framework

The following document is a written account of the Code School screencasting framework. It should be used as a reference of the accompanying screencast on the topic.

Why you should care about screencasting?

You're probably aren't going to take the time to read this document if you're not interested, but there are a lot of nice side effects caused by learning how to create quality screencasts.

  1. Communicating more effectively - At Envy Labs we produce screencasts for our clients all the time. Whether it's demoing a new feature or for a presentation for an invester, they're often much more effective and pleasent than a phone call or screen sharing.
@kmccarth
kmccarth / nginx.conf
Last active October 5, 2019 08:29
nginx at Streetwise Media. This bad boy handled 2M+ UVs on one VM
user www-data;
worker_processes 4; # number of cores on machine
error_log /var/log/nginx/error.log;
events {
worker_connections 1024;
}
http {
@c00kiemon5ter
c00kiemon5ter / scratchpad.sh
Created September 13, 2012 16:47
script to toggle visibility of a terminal
#!/bin/sh
name="scratchpad"
class="URxvt"
# print the window id of the window with the given
# instance name as the first argument '$1' and
# class name as the second argument '$2'
get_win_id() {
xwininfo -root -children -int | awk -v n="$1" -v c="$2" '$3 == "(\""n"\"" && $4 == "\""c"\")" { print $1 }'
urxvt.scrollBar: false
urxvt.font: xft:inconsolata:size=11
urxvt.boldFont: xft:inconsolata:size=11
urxvt.cursorColor: #7F7F7F
Xft.hintstyle: hintfull
Xft.hinting: true
Xft.antialias: true
Xft.rgba: rgb
@navilan
navilan / meta.yaml
Created September 7, 2012 04:11
Locale plugin for multilanguage hyde site
# This file should be placed in the root directory for french language files
# ...
language: fr
lc: fr_CA
# ...
@axilleas
axilleas / archgitlab.sh
Last active March 29, 2021 11:53
Install GitLab 5.0 on Archlinux
#!/bin/bash
##########################
## Check if run as root ##
##########################
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
@andrenam
andrenam / Gemfile
Created July 29, 2012 03:02
gitlab Gemfile (working for raspberry pi with raspbian)
source "http://rubygems.org"
gem "rails", "3.2.5"
# Supported DBs
gem "sqlite3"
gem "mysql2"
# Auth
gem "devise", "~> 2.1.0"