Skip to content

Instantly share code, notes, and snippets.

View zzeroo's full-sized avatar
💤
zzeroo...

zzeroo zzeroo

💤
zzeroo...
View GitHub Profile
@zzeroo
zzeroo / ruby_on_rails_deployment.md
Last active April 1, 2019 09:42 — forked from zentetsukenz/ruby_on_rails_deployment.md
Deploy Ruby on Rails application with Docker Compose and Capistrano with ease

Docker

Files and Folders.

|
|\_ app
|...
|\_ docker
| |
@zzeroo
zzeroo / dropbox_ext4.c
Created February 5, 2019 08:46 — forked from dimaryaz/dropbox_ext4.c
Dropbox ext4 hack
/*
* dropbox_ext4.c
*
* Compile like this:
* gcc -shared -fPIC -ldl -o libdropbox_ext4.so dropbox_ext4.c
*
* Run Dropbox like this:
* LD_PRELOAD=./libdropbox_ext4.so ~/.dropbox-dist/dropboxd
*/
extern crate gtk;
#[macro_use]
extern crate relm;
#[macro_use]
extern crate relm_derive;
use gtk::{
Button, ButtonExt, ContainerExt, Inhibit,
Orientation::{Horizontal, Vertical},
WidgetExt, Window, WindowType,
@zzeroo
zzeroo / 256color.pl
Created December 18, 2018 21:49 — forked from hSATAC/256color.pl
256color.pl
#!/usr/bin/perl
# Author: Todd Larason <jtl@molehill.org>
# $XFree86: xc/programs/xterm/vttests/256colors2.pl,v 1.2 2002/03/26 01:46:43 dickey Exp $
# use the resources for colors 0-15 - usually more-or-less a
# reproduction of the standard ANSI colors, but possibly more
# pleasing shades
# colors 16-231 are a 6x6x6 color cube
for ($red = 0; $red < 6; $red++) {
@zzeroo
zzeroo / rocketguide.md
Created April 5, 2018 13:26 — forked from belst/rocketguide.md
Deploy Rocket in production

Deploy Rocket using Letsencrypt and nginx

Information

This guide uses the domain your-domain.tld and its www. prefixed version. It starts the rocket application on 127.0.0.1:1337 and as the user www-data. The proxy listens on port 80 and 443 though.
If you need other values, update them accordingly in your nginx and systemd configs.

Prerequisites

You need to have nginx, certbot and rust installed.

@zzeroo
zzeroo / readme2.rs
Created November 22, 2017 16:51
Second part of the relm README example code
#![feature(proc_macro)]
/// # `#[widget] attribute`
///
/// For the nightly users, a `#[widget]` attribute is provided to simplify the creation of a widget.
///
/// This attribute does the following:
///
/// * Provide a view! macro to create the widget with a declarative syntax.
/// * Automatically create the fn root(), type Msg, type Model, type ModelParam and type Root items.
@zzeroo
zzeroo / readme1.rs
Created November 22, 2017 16:05
First part of relm README
/// First, add this to you Cargo.toml:
// gtk = "^0.2.0"
// relm = "^0.10.0"
// relm-derive = "^0.10.0"
/// Next, add this to your crate:
extern crate gtk;
#[macro_use]
extern crate relm;
#[macro_use]
@zzeroo
zzeroo / dmesg
Created September 18, 2017 11:37
dmesg
[ 5.277214] OF: /soc@01c00000/i2c@01c2b800/edt-ft5x06@38: could not get #gpio-cells for /clocks/cpu@01c20054
[ 5.287182] edt_ft5x06 2-0038: Failed to request GPIO wake pin, error -22
[ 5.294046] edt_ft5x06: probe of 2-0038 failed with error -22
[ 5.301030] mousedev: PS/2 mouse device common for all mice
root@bananapro:~#
@zzeroo
zzeroo / log.do_compile
Created September 10, 2017 12:14
u-boot 2017.07 yocto dtc-native, swig-native
DEBUG: Executing shell function do_compile
NOTE: make -j 8 CROSS_COMPILE=arm-poky-linux-gnueabi- CC=arm-poky-linux-gnueabi-gcc --sysroot=/home/build/shared/build-bananapro/tmp/work/bananapro-poky-linux-gnueabi/u-boot/1_2017.07-r0/recipe-sysroot V=1 HOSTCC=gcc -isystem/home/build/shared/build-bananapro/tmp/work/bananapro-poky-linux-gnueabi/u-boot/1_2017.07-r0/recipe-sysroot-native/usr/include -O2 -pipe -L/home/build/shared/build-bananapro/tmp/work/bananapro-poky-linux-gnueabi/u-boot/1_2017.07-r0/recipe-sysroot-native/usr/lib -L/home/build/shared/build-bananapro/tmp/work/bananapro-poky-linux-gnueabi/u-boot/1_2017.07-r0/recipe-sysroot-native/lib -Wl,-rpath-link,/home/build/shared/build-bananapro/tmp/work/bananapro-poky-linux-gnueabi/u-boot/1_2017.07-r0/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/home/build/shared/build-bananapro/tmp/work/bananapro-poky-linux-gnueabi/u-boot/1_2017.07-r0/recipe-sysroot-native/lib -Wl,-rpath,/home/build/shared/build-bananapro/tmp/work/bananapro-poky-linux-gnueabi/u-boot/1_2017
@zzeroo
zzeroo / log.do_compile
Created September 8, 2017 13:53
oe u-boot-2017.07
DEBUG: Executing shell function do_compile
NOTE: make -j 8 CROSS_COMPILE=arm-poky-linux-gnueabi- CC=arm-poky-linux-gnueabi-gcc --sysroot=/home/build/shared/build-bananapro/tmp/work/bananapro-poky-linux-gnueabi/u-boot/1_2017.07-r0/recipe-sysroot V=1 HOSTCC=gcc -isystem/home/build/shared/build-bananapro/tmp/work/bananapro-poky-linux-gnueabi/u-boot/1_2017.07-r0/recipe-sysroot-native/usr/include -O2 -pipe -L/home/build/shared/build-bananapro/tmp/work/bananapro-poky-linux-gnueabi/u-boot/1_2017.07-r0/recipe-sysroot-native/usr/lib -L/home/build/shared/build-bananapro/tmp/work/bananapro-poky-linux-gnueabi/u-boot/1_2017.07-r0/recipe-sysroot-native/lib -Wl,-rpath-link,/home/build/shared/build-bananapro/tmp/work/bananapro-poky-linux-gnueabi/u-boot/1_2017.07-r0/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/home/build/shared/build-bananapro/tmp/work/bananapro-poky-linux-gnueabi/u-boot/1_2017.07-r0/recipe-sysroot-native/lib -Wl,-rpath,/home/build/shared/build-bananapro/tmp/work/bananapro-poky-linux-gnueabi/u-boot/1_2017