Skip to content

Instantly share code, notes, and snippets.

View ehlyzov's full-sized avatar

Eugene Hlyzov ehlyzov

  • http://datafabric.cc
  • SaintPetersburg, Russia
View GitHub Profile
@joost
joost / deploy.rb
Last active October 10, 2018 09:12 — forked from toobulkeh/deploy.rb
Capistrano 3 rails console tasks
# encoding: UTF-8
# Place in config/deploy.rb
# See: https://gist.github.com/joost/9343156
# Adapted to work with rbenv
namespace :rails do
desc "Open the rails console on primary app server"
task :console do
on roles(:app), primary: true do
rails_env = fetch(:stage)
execute_interactively "#{bundle_cmd} #{current_path}/script/rails console #{rails_env}"
@nelix
nelix / README
Last active December 26, 2015 22:39
Cloud66 postgresql with wal backups on S3
You need to do base backups often...
sudo -u postgres envdir /etc/wal-e.d/env /usr/local/bin/wal-e backup-push /usr/local/pgsql/data
You can check how many objects are not archived:
./var/backup_status.sh
; call trello2org interactively
; or pragmatically like this: (trello2org "c:/Users/jfurtney/blo-up-2-7.json")
(require 'json)
(defun convert-trello-json-file-to-org (trello-json-file)
(let* ((board (json-read-file trello-json-file))
(board-name (cdr (assoc 'name (cdr board))))
(lists (cdr (assoc 'lists (cdr board))))
@luebken
luebken / trello_points_to_google.js
Created February 23, 2012 17:06
grab points from trello and puts them into a google spreadsheet
// trello variables
var api_key = "<your_api_key>";
var api_token = "<your_api_token>";
var board_id = "<your_board_id>";
var url = "https://api.trello.com/1/";
// google variables
var spreadsheet = "<your_spreadsheet_id>";
var key_and_token = "key="+api_key+"&token="+api_token;
@awd
awd / migrate_paperclip_to_s3.rake
Created October 1, 2011 23:31
Migrate local paperclip assets to Amazon S3.
##
# Use this behind the scenes to migrate files from your filesystem to Amazon S3
# %: rake paperclip_migration:migrate_to_s3
##
namespace :attachments do
desc "migrate files from filesystem to s3"
task :migrate_to_s3 => :environment do
require 'aws/s3'
@kosso
kosso / slider.html
Created August 1, 2011 19:45
A very simple basic 'slider' bar in JavaScript and CSS
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
#bar{
width:200px;
height:25px;
border:1px solid black;
position:relative;