Skip to content

Instantly share code, notes, and snippets.

View constantine-nikolaou's full-sized avatar

Constantine Nikolaou constantine-nikolaou

View GitHub Profile
@constantine-nikolaou
constantine-nikolaou / uber.yaml
Created April 5, 2021 13:39 — forked from earth2marsh/uber.yaml
A Swagger YAML specification for Uber's new API
swagger: 2
info:
title: The new Uber API
description: Move your app forward with the Uber API
version: "1.0.0"
host: api.uber.com
schemes:
- https
basePath: /v1
produces:
@constantine-nikolaou
constantine-nikolaou / .bash_profile
Last active May 30, 2018 09:35 — forked from hernamesbarbara/.bash_profile
bash_profile minimised to use on *NIX based machines, with terminal colors and useful aliases
#!/bin/bash
export TERM=xterm-color
export CLICOLOR=1
export GREP_OPTIONS='--color=auto'
# export LSCOLORS=Exfxcxdxbxegedabagacad
export LSCOLORS=gxfxcxdxbxegedabagacad # Dark lscolor scheme
# Don't put duplicate lines in your bash history
export HISTCONTROL=ignoredups
# increase history limit (100KB or 5K entries)
export HISTFILESIZE=100000
@constantine-nikolaou
constantine-nikolaou / url62.py
Created February 19, 2018 19:43 — forked from mattupstate/url62.py
python url62 implementation
import string
import uuid
alphabet = string.digits + string.ascii_letters
def base62_encode(n):
ret = ''
while n > 0:
ret = alphabet[n % 62] + ret
n /= 62

Principles of Adult Behavior

  1. Be patient. No matter what.
  2. Don’t badmouth: Assign responsibility, not blame. Say nothing of another you wouldn’t say to him.
  3. Never assume the motives of others are, to them, less noble than yours are to you.
  4. Expand your sense of the possible.
  5. Don’t trouble yourself with matters you truly cannot change.
  6. Expect no more of anyone than you can deliver yourself.
  7. Tolerate ambiguity.
  8. Laugh at yourself frequently.
@constantine-nikolaou
constantine-nikolaou / iterm2.md
Created October 5, 2017 09:46 — forked from squarism/iterm2.md
iterm2 cheatsheet

Tabs and Windows

Function Shortcut
Fullscreen + Enter
Previous Tab + Left Arrow
Next Tab + Right Arrow
Go to Tab + Number
Go to Window + Option + Number
Go to Split Pane by Direction + Option + Arrow

Keybase proof

I hereby claim:

  • I am cnicolaou on github.
  • I am cnicolaou (https://keybase.io/cnicolaou) on keybase.
  • I have a public key ASBFP7NXhX9M-4u12JfBQUwN5peg3tR5O8uW1P_mWW5F5Qo

To claim this, I am signing this object:

@constantine-nikolaou
constantine-nikolaou / list_cheat_sheets.md
Last active May 9, 2016 11:14
Handy bookmark page to useful cheatsheets I use when coding
@constantine-nikolaou
constantine-nikolaou / caesar_cipher.rb
Created April 15, 2016 14:47
Solution to Caesar Cipher implemented in ruby
def alphabet
Array('a'..'z') | (Array('A'..'Z'))
end
def cs_encrypt(string, key = 0)
# Rotate switches alphabets based on the passed key
dictionary = Hash[alphabet.zip(alphabet.rotate(key))]
string.chars.map { |str| dictionary.fetch(str, ' ') }
end
class UpgradeToRefineryTwo < ActiveRecord::Migration
def self.up
# For refinerycms-authentication
rename_table :roles_users, :refinery_roles_users
rename_table :roles, :refinery_roles
rename_table :user_plugins, :refinery_user_plugins
rename_table :users, :refinery_users
remove_column :refinery_users, :persistence_token
remove_column :refinery_users, :perishable_token
remove_column :refinery_users, :remember_token
@constantine-nikolaou
constantine-nikolaou / setup-statsd.sh
Created September 9, 2012 15:08 — forked from collegeman/setup-statsd.sh
Turn an Ubuntu 10.04 linode into a StatsD/Graphite server
# install git
sudo apt-get install g++ curl libssl-dev apache2-utils
sudo apt-get install git-core
# download the Node source, compile and install it
git clone https://github.com/joyent/node.git
cd node
./configure
make
sudo make install
# install the Node package manager for later use