Skip to content

Instantly share code, notes, and snippets.

View r3nya's full-sized avatar
☮️
¯\_(ツ)_/¯

Andrew M. r3nya

☮️
¯\_(ツ)_/¯
View GitHub Profile
@r3nya
r3nya / gulpfile.js
Last active August 29, 2015 14:16
Translite
var gulp = require('gulp'),
path = require('path'),
rename = require('gulp-rename'),
translit = require('translitit-cyrillic-russian-to-latin');
gulp.task('files', function () {
gulp.src('./файл.txt')
.pipe(rename(function (path) {
path.basename = translit(path.basename);
}))
@r3nya
r3nya / Install_fira.sh
Created February 27, 2015 08:36
Install Fira fonts
#!/bin/bash
cd /tmp
# install unzip just in case the user doesn't already have it.
sudo apt-get install unzip -y
wget "http://www.carrois.com/wordpress/downloads/fira_3_1/FiraFonts3111.zip"
unzip FiraFonts3111.zip
#!/usr/bin/env sh
tweetbot_running() {
ps x | grep -v grep | grep Tweetbot > /dev/null
}
clean_tweetbot_cache() {
rm -rf ~/Library/Containers/com.tapbots.TweetbotMac/Data/Library/Caches/com.tapbots.TweetbotMac
}

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname

Keybase proof

I hereby claim:

  • I am r3nya on github.
  • I am r3nya (https://keybase.io/r3nya) on keybase.
  • I have a public key whose fingerprint is C469 79D4 3260 4D1C 53C5 252C 913F E3A9 45D9 2E6E

To claim this, I am signing this object:

@r3nya
r3nya / singleton_cat.rb
Last active December 15, 2015 14:49
Мой пример синглтона на Ruby, надеюсь он правильный. :)
# encoding: UTF-8
require 'singleton'
class Cats
include Singleton
def initialize
@cat = { name: 'Alice', sex: 'F' }
end
require 'awesome_print'
require 'active_record'
require 'pg'
require 'pp'
require 'roo'
ActiveRecord::Base.establish_connection(
:adapter => 'postgresql',
:host => 'localhost',
:username => 'kevin',
@r3nya
r3nya / db.hostInfo
Created March 31, 2013 18:47
$> mongo
> db.hostInfo()
{
"system" : {
"currentTime" : ISODate("2013-03-31T18:46:43.023Z"),
"hostname" : "MacBook-Air-Andrej.local",
"cpuAddrSize" : 64,
"memSizeMB" : 4096,
"numCores" : 4,
"cpuArch" : "x86_64",
"numaEnabled" : false
## Prepare ###################################################################
# Remove RVM
rvm implode
# Ensure your homebrew is working properly and up to date
brew doctor
brew update
## Install ###################################################################

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt