The goal: Upload several files (virtually big files) to a Rails application without compromising the user experience.
jQuery File Upload + Nginx + Rails (Carrierwave) + Sidekiq
- jQuery File Upload (http://blueimp.github.io/jQuery-File-Upload/)
ruby '2.7.1' | |
gem 'rails', github: 'rails/rails' | |
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
# Action Text | |
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
gem 'okra', github: 'basecamp/okra' | |
# Drivers |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <poll.h> | |
#include <uv.h> | |
static void on_close(uv_handle_t* handle); | |
static void on_connect(uv_connect_t* req, int status); | |
static void on_write(uv_write_t* req, int status); | |
static void on_alloc(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf) |
// kkrotchbulge: a cheap nasty hack to capture 60fps vids on Linux & BSD systems / GreaseMonkey, 2015 - Public Domain | |
// note, only does video right now, and only handles SDL2 + GL. | |
// compile+render: cc -fPIC -shared -o libkkrotchbulge.so kkrotchbulge.c -I/usr/local/include `sdl2-config --cflags` -L/usr/local/lib -lGL && env LD_PRELOAD=./libkkrotchbulge.so ./tfiy | |
// transcode (in another terminal): ffmpeg -s 1280x720 -r 60 -pix_fmt rgba -f rawvideo -i kkrotchbulge-out-vid tfiy-vid.mkv | |
// combine audio: ffmpeg -i tfiy-vid.mkv -i dat/ds15rel-gm.ogg -acodec copy -vcodec copy tfiy-60fps.mkv | |
#include <string.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <errno.h> |
/************************************************************************** | |
* simpletun.c * | |
* * | |
* A simplistic, simple-minded, naive tunnelling program using tun/tap * | |
* interfaces and TCP. Handles (badly) IPv4 for tun, ARP and IPv4 for * | |
* tap. DO NOT USE THIS PROGRAM FOR SERIOUS PURPOSES. * | |
* * | |
* You have been warned. * | |
* * | |
* (C) 2009 Davide Brini. * |
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
// init VPN manager | |
self.vpnManager = [NEVPNManager sharedManager]; | |
// load config from perference | |
[_vpnManager loadFromPreferencesWithCompletionHandler:^(NSError *error) { |
# This script has to be run as a root user | |
echo "* Updating system" | |
apt-get update | |
apt-get -y upgrade | |
echo "* Installing packages" | |
apt-get -y install build-essential libmagickcore-dev imagemagick libmagickwand-dev libxml2-dev libxslt1-dev git-core nginx redis-server curl nodejs htop | |
id -u deploy &> /dev/null | |
if [ $? -ne 0 ] |
• Node 1, 2, … X | |
○ sudo su -l | |
○ cd | |
○ apt-get update | |
○ apt-get upgrade | |
○ apt-get install git-core | |
○ apt-get install libyaml-dev | |
○ apt-get install erlang | |
○ apt-get install unzip | |
○ apt-get build-dep ejabberd |
The goal: Upload several files (virtually big files) to a Rails application without compromising the user experience.
jQuery File Upload + Nginx + Rails (Carrierwave) + Sidekiq
# support/feature_macros.rb | |
module FeaturesMacros | |
def signin_admin | |
DatabaseCleaner.clean | |
@user ||= FactoryGirl.create(:user) | |
visit '/sign_in' | |
within("#new_user") do | |
fill_in 'user[email]', :with => user.email |
uninstall
JetBrains settings:curl -sL https://gist.github.com/denji/9731967/raw/jetbrains-uninstall.sh | bash -s
backup
JetBrains settings:curl -sL https://gist.github.com/denji/9731967/raw/jetbrains-backup.sh | bash -s