Skip to content

Instantly share code, notes, and snippets.

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

Andrew M. r3nya

☮️
¯\_(ツ)_/¯
View GitHub Profile
@williamchang73
williamchang73 / gist:7823bcea66c9aaf0a34b
Created October 22, 2014 06:14
clean up mac cache files
echo "clean up start >>>>>>>>>>>>>>>>>>>>>>"
clear
df -h
echo "clean desktop..."
rm -rf ~/Desktop/*
echo "clean download..."
rm -rf ~/Downloads/*
echo "clean trashcan..."
@kugaevsky
kugaevsky / gulpfile.coffee
Last active August 29, 2015 14:08
Assets pipeline via Gulp
# ------------
# Task runners
# ------------
# Gulp builder
gulp = require 'gulp'
# Run tasks one by one
runSeq = require 'run-sequence'
@smithua
smithua / gulpfile.js
Created August 23, 2015 18:40
proj-gulpfile.js
// npm install gulp gulp-sass gulp-autoprefixer gulp-minify-css gulp-concat gulp-newer gulp-livereload gulp-plumber beepbeep colors --save
var gulp = require('gulp'),
sass = require('gulp-sass'),
autoprefixer = require('gulp-autoprefixer'),
minifyCSS = require('gulp-minify-css'),
newer = require('gulp-newer'),
livereload = require('gulp-livereload'),
plumber = require('gulp-plumber'),
beep = require('beepbeep'),
@sasha-id
sasha-id / bluepill
Created August 11, 2012 02:33
bluepill init.d script for non-privileged user
#!/bin/sh
### BEGIN INIT INFO
# Provides: bluepill
# Required-Start: $local_fs $remote_fs $network $syslog $time
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: bluepill daemon, providing process monitoring
# Description: bluepill is a monitoring tool. More info at http://github.com/arya/bluepill.
@pperon
pperon / ring.erl
Created December 22, 2011 18:23
My solution to the Erlang Process Ring Exercise 4-2 in Programming Erlang
-module(ring).
-export([start/3, loop/0]).
%%%
%%% An implementation of an Erlang process ring. This is probably the
%%% Erlang equivalent of breaking your first board in Karate class.
%%%
start(NumMsgs, NumProcs, Msg) ->
UnlinkedRing = create_process([], NumProcs),
@leucos
leucos / README.md
Last active December 11, 2015 10:28
Ruby playbook example

Deploying Ruby with Ansible

Define these variables somewhere and let it go :

  • ruby_current: the ruby version you want to deploy (e.g. "1.9.3-p374")
  • ruby_user: Under which account we want ruby to be installed (e.g. "myappuser"; "ruby" in this playbook)

Note : this playbook only works with '-i' in the sudo line since it requires the target user environment to be fully loaded

@kugaevsky
kugaevsky / Preferences.sublime-settings
Last active December 21, 2015 05:28
My Sublime Text 3 Settings
{
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"drag_text": false,
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"fallback_encoding": "Cyrillic (Windows 1251)",
"font_size": 12,
"highlight_line": true,
"ignored_packages":
[
#!/bin/bash
# ./encrypt.sh -keys public.pem private.pem
# ./encrypt.sh folder public.pem > decrypt-folder.sh
# chmod +x decrypt-folder.sh
# ./decrypt-folder.sh private.pem > folder.tar
#
#
# $ ./encrypt.sh
# Usage: ./encrypt-file.sh [directory] [public-key] > [decryption-script]
@kugaevsky
kugaevsky / taxpayer_id.rb
Last active December 31, 2015 19:19
Russian taxpayer id validator
class TaxpayerID
FACTORS = [ 3, 7, 2, 4, 10, 3, 5, 9, 4, 6, 8, 0 ]
def initialize value
@digits = value.to_s.chars.map(&:to_i)
raise ArgumentError, 'unexpected argument length (must be 10 or 12 chars)' unless @digits.length == 10 || @digits.length == 12
@result = (@digits.length == 10 ? check_ten : check_twelve)
end
Highcharts.theme = {
colors: ['#f17e30', '#cccccf', '#ED561B', '#DDDF00', '#24CBE5', '#64E572',
'#FF9655', '#FFF263', '#6AF9C4'],
colors: ['#f47920', '#cccccf', '#ED561B', '#DDDF00', '#24CBE5', '#64E572',
'#FF9655', '#FFF263', '#6AF9C4'],
chart: {
backgroundColor: 'transparent'
},
credits: {
enabled: false