Skip to content

Instantly share code, notes, and snippets.

@BlackFoks
BlackFoks / docker-pry-rails.md
Created August 14, 2018 09:59 — forked from briankung/docker-pry-rails.md
Using pry-rails with Docker
@BlackFoks
BlackFoks / audio-book-reader.md
Created November 16, 2016 15:20 — forked from wkjagt/audio-book-reader.md
How I built an audio book reader for my nearly blind grandfather

#How I built an audio book reader for my nearly blind grandfather

Tweet this - Follow me

Last year, when visiting my family back home in Holland, I also stopped by my grand-parents. My grand-father, now 93 years old, had always been a very active man. However, during the presceding couple of months, he'd gone almost completely blind and now spent his days sitting in a chair. Trying to think of something for him to do, I suggested he try out audio books. After finally convincing him -- he said audio books were for sad old people -- that listening to a well performed recording is actually a wonderful experience, I realized the problem of this idea.

####The problem with audio devices and the newly blind. After my first impulse to jump up and go buy him an

@BlackFoks
BlackFoks / build-and-deploy.sh
Created February 16, 2016 08:01 — forked from jrschumacher/build-and-deploy.sh
Ionic Automated Build and Deploy to HockeyApp
#!/bin/bash
PROJECT_NAME=MyApp
SCHEME_NAME=MyApp
STARTTIME=$(date +%s);
set -e
set -x
### Install dependencies
echo "--- Install dependencies [Time Elapsed $(($(date +%s) - $STARTTIME))s]"
@BlackFoks
BlackFoks / semaphore-es.sh
Last active October 17, 2018 18:09
A script for installing ES on SemaphoreCI
#!/bin/bash
# Install a custom ElasticSearch version - https://www.elastic.co/products/elasticsearch
#
# To run this script on SemaphoreCI, add the following command to your project's build setup:
# \curl -sSL <RAW_URL_FOR_THIS_SCRIPT> | bash -s
#
ELASTICSEARCH_VERSION="0.90.13"
ELASTICSEARCH_PORT="9200"
ELASTICSEARCH_DIR="$SEMAPHORE_PROJECT_DIR/elasticsearch"
ELASTICSEARCH_WAIT_TIME="15"
@BlackFoks
BlackFoks / es.sh
Last active January 26, 2016 10:17
#!/bin/bash
# Install a custom ElasticSearch version - https://www.elastic.co/products/elasticsearch
#
# To run this script in Codeship, add the following
# command to your project's test setup command:
# \curl -sSL https://raw.githubusercontent.com/codeship/scripts/master/packages/elasticsearch.sh | bash -s
#
# Add at least the following environment variables to your project configuration
# (otherwise the defaults below will be used).
# * ELASTICSEARCH_VERSION
(function(key){setInterval(function(){JoinGame(key);$J('.newmodal').remove();},750)})(43166)
#!/usr/bin/env python
# Script for showing or setting the dropbox folder.
#
# Execute without options to show current dropbox folder (if non-default).
# Execute with --setfolder=/foo/bar to set new dropbox folder.
#
# Written by Wim Coenen ([email protected]).
import base64
class ApplicationController < ActionController::Base
before_filter :ensure_proper_protocol
protected
def ssl_allowed_action?
(params[:controller] == 'users/sessions' && ['new', 'create'].include?(params[:action])) ||
(params[:controller] == 'users/registrations' && ['new', 'create', 'edit', 'update'].include?(params[:action])) ||
(params[:controller] == 'users/omniauth_callbacks')
end
@BlackFoks
BlackFoks / input.scss
Created September 25, 2012 09:26 — forked from twe4ked/input.scss
FREE! Sass (SCSS) mixin for including retina images (useful when developing for iOS).
@mixin background-image-retina($file, $type, $width, $height) {
background-image: url($file + '.' + $type);
@media (-webkit-min-device-pixel-ratio: 2), (-moz-min-device-pixel-ratio: 2) {
& {
background-image: url($file + '@2x.' + $type);
-webkit-background-size: $width $height;
}
}
}
@BlackFoks
BlackFoks / deploy.rb
Created August 27, 2012 10:06
Example of deploy.rb
# ---> RVM details
# добавляем в PATH путь до папки lib rvm
$:.unshift(File.expand_path('./lib', ENV['rvm_path']))
# загружаем плагин для поддержки rvm
require "rvm/capistrano"
# указываем какую версию руби и какой гемсет использовать
set :rvm_ruby_string, '1.9.3@blackblog'
# говорим, что rvm установлена для одного пользователя
# если же rvm установлена глобально, то укажите :system
set :rvm_type, :user