Skip to content

Instantly share code, notes, and snippets.

View constantine-nikolaou's full-sized avatar

Constantine Nikolaou constantine-nikolaou

View GitHub Profile
@briarsweetbriar
briarsweetbriar / README.md
Last active December 16, 2015 22:28 — forked from linjunpop/README.md
@stephenhardy
stephenhardy / git-clearHistory
Created April 26, 2013 22:14
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin [email protected]:<YOUR ACCOUNT>/<YOUR REPOS>.git
@joost
joost / ruby_google_analytics_server_to_server.md
Last active November 27, 2023 15:43
Google Analytics API (server-to-server) using Ruby
@arfon
arfon / gmail_ruby_labels.rb
Created April 4, 2013 12:10
GMail labels
require 'gmail'
label = 'MY LABLE'
gmail = Gmail.connect('USERNAME', 'PASSWORD')
gmail.mailbox(label).emails.each do |email|
mailbox = email.sender.first.mailbox
host = email.sender.first.host
puts "#{mailbox}@#{host}"
end
@hbrandl
hbrandl / RailsFlashToHeaders.md
Last active November 2, 2023 11:57 — forked from linjunpop/README.md
Rails flash messages with AJAX requests & twitter-bootstrap
@lmullen
lmullen / .slate
Created February 8, 2013 04:19
My configuration file for the Slate window manager
# GLOBAL CONFIGURATIONS
# -------------------------------------------------------------------
# See https://github.com/jigish/slate/wiki/Global-Configs
config defaultToCurrentScreen true
config secondsBeforeRepeat 0.4
config secondsBetweenRepeat 0.1
config keyboardLayout "qwerty"
config nudgePercentOf screenSize
config resizePercentOf screenSize
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 20, 2025 21:14
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@dfang
dfang / capistrano deploy to local vagrant
Last active March 1, 2018 21:45
very very very basic guide for deploy rails application to local application
# assumptions: virtualbox, vagrant already installed
# and there is a box lucid32
1. rails new appdmeo , gem capistrano , then bundle
2. vagrant init lucid32
3. capify .
# !important
# vagrant ssh-config >> ~/.ssh/config
# vagrant ssh-config | grep IdentityFile | awk '{print $2}' that's where private key located
@adharris
adharris / postgres_array.go
Created November 28, 2012 19:52
PostgreSQL demo of Array types using Golang
package main
import (
"database/sql"
"errors"
"fmt"
_ "github.com/bmizerany/pq"
"os"
"regexp"
"strings"
@funny-falcon
funny-falcon / changes.md
Last active August 15, 2024 15:13
Performace patch for ruby-1.9.3-p327

Changes:

  • this version includes backport of Greg Price's patch for speedup startup http://bugs.ruby-lang.org/issues/7158 .

    ruby-core prefers his way to do thing, so that I abandon cached-lp and sorted-lf patches of mine.

  • this version integrates 'array as queue' patch, which improves performance when push/shift pattern is heavily used on Array.

    This patch is accepted into trunk for Ruby 2.0 and last possible bug is found by Yui Naruse. It is used in production* for a couple of months without issues even with this bug.