Skip to content

Instantly share code, notes, and snippets.

View glaszig's full-sized avatar

glaszig

  • available for hire. contact me.
  • remote
View GitHub Profile
@jashmenn
jashmenn / irbrc.rb
Created June 26, 2013 18:03
put in ~/.irbrc
# vim: set ft=ruby
#
# Nate Murray's ~/.irbrc
#
# Can be found at:
# http://gist.github.com/6626
# git clone git://gist.github.com/6626.git gist-6626
#
# Include colorization
require 'rubygems'
#
# Jekyll Generator for SCSS
#
# (File paths in this description relative to jekyll project root directory)
# Place this file in ./_plugins
# Place .scss files in ./_scss
# Compiles .scss files in ./_scss to .css files in whatever directory you indicated in your config
# Config file placed in ./_sass/config.rb
#
@nicolashery
nicolashery / solarized-dark.css
Last active March 25, 2022 08:38 — forked from scotu/solarized.css
Solarized theme stylesheets for Jekyll and Pygments
/* Solarized Dark
For use with Jekyll and Pygments
http://ethanschoonover.com/solarized
SOLARIZED HEX ROLE
--------- -------- ------------------------------------------
base03 #002b36 background
base01 #586e75 comments / secondary content
@willurd
willurd / web-servers.md
Last active May 18, 2025 17:06
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@magnetikonline
magnetikonline / README.md
Last active February 7, 2025 07:27
IE 7/8/9/10/11 Virtual machines from Microsoft - Linux w/VirtualBox installation notes.
@p1nox
p1nox / postgresql_configuration_on_ubuntu_for_rails.md
Last active July 20, 2024 11:55
PostgreSQL configuration without password on Ubuntu for Rails

Abstract

You could have postgre installed on localhost with password (or without user or password seted after instalation) but if we are developing we really don't need password, so configuring postgre server without password for all your rails project is usefull.

Install Postgre packages

  • postgresql
  • postgresql-client
  • libpq-dev
@gdamjan
gdamjan / README.md
Last active April 5, 2025 23:28
Setup for an easy to use, simple reverse http tunnels with nginx and ssh. It's that simple there's no authentication at all. The end result, a single ssh command invocation gives you a public url for your web app hosted on your laptop.

What

A lot of times you are developing a web application on your own laptop or home computer and would like to demo it to the public. Most of those times you are behind a router/firewall and you don't have a public IP address. Instead of configuring routers (often not possible), this solution gives you a public URL that's reverse tunnelled via ssh to your laptop.

Because of the relaxation of the sshd setup, it's best used on a dedicated virtual machine just for this (an Amazon micro instance for example).

Requirements

anonymous
anonymous / concerning.rb
Created December 18, 2012 18:00
class Module
# We often find ourselves with a medium-sized chunk of behavior that we'd
# like to extract, but only mix in to a single class.
#
# We typically choose to leave the implementation directly in the class,
# perhaps with a comment, because the mental and visual overhead of defining
# a module, making it a Concern, and including it is just too great.
#
#
# Using comments as lightweight modularity:
@choonkeat
choonkeat / get_mcc_mnc.rb
Created December 13, 2012 15:43
mcc mnc data from wikipedia
# modified https://gist.github.com/4147383
require 'uri'
require 'cgi'
require 'net/http'
require 'openssl'
def request(url, params = {}, klass = Net::HTTP::Get, pem_filecontent = nil)
uri = uri.kind_of?(URI::Generic) ? url : URI.parse(url)
if klass == Net::HTTP::Get && (!params.empty?)
uri.query = [uri.query, URI.encode_www_form(params.stringify_keys)].reject(&:blank?).join('&')
@mbostock
mbostock / .block
Last active February 20, 2025 10:51
Gradient Along Stroke
license: gpl-3.0