This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Extremely basic development setup to serve the current directory at http://localhost:9001 | |
# Start nginx in this directory with `nginx -p . -c nginx.conf` | |
# Stop nginx with `nginx -p . -s stop` | |
# for opensuse: if running as a user, after running yarn build: `/usr/sbin/nginx -p . -c nginx.conf` | |
events {} | |
http { | |
# Serve files with correct mimetypes on OSX | |
# location may have to be adjusted depending on your OS and nginx install | |
include /usr/local/etc/nginx/mime.types; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEGIN { $ENV{MOJO_MAX_MESSAGE_SIZE} = 1024**3 } | |
use strict; | |
use Mojo::UserAgent; | |
my $ua = Mojo::UserAgent->new; | |
$ua->on(start => sub { | |
my ($ua, $tx) = @_; | |
my $progress = 0; | |
$tx->res->on(progress => sub { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
description "Stat HTTP server with aptly REST API" | |
start on filesystem or runlevel [2345] | |
stop on runlevel [!2345] | |
respawn | |
umask 022 | |
chdir / | |
setuid smartmatic | |
setgid smartmatic | |
console log # log stdout/stderr to /var/log/upstart/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########## SETTINGS | |
# On startup, lftp executes ~/.lftprc and ~/.lftp/rc. You can place aliases and 'set' commands | |
# there. Some people prefer to see full protocol debug, use 'debug' to turn the debug on. | |
# Certain commands and settings take a time interval parameter. It has the format Nx[Nx...], where N is time amount | |
# (floating point) and x is time unit: d - days, h - hours, m - minutes, s - seconds. Default unit is second. E.g. | |
# 5h30m or 5.5h. Also the interval can be 'infinity', 'inf', 'never', 'forever' - it means infinite interval. E.g. | |
# 'sleep forever' or 'set dns:cache-expire never'. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SDL2/SDL.h> | |
#include <SDL2/SDL_mixer.h> | |
#define WAV_PATH "Roland-GR-1-Trumpet-C5.wav" | |
#define MUS_PATH "HR2_Friska.ogg" | |
// Our wave file | |
Mix_Chunk *wave = NULL; | |
// Our music file | |
Mix_Music *music = NULL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install fsarchiver | |
# In Fedora/RedHat system's :: yum install fsarchiver sfdisk dd | |
# In Debian/Ubuntu System :: apt-get install fsarchiver sfdisk dd | |
DEVICE_TO_BACKUP=/dev/sdb # assuming /dev/sda is where you have booted ur primary OS | |
mkdir ./backup_with_fsarchiver # create a directory | |
cd ./backup_with_fsarchiver # enter into newly created directory | |
# only get the first 512 bytes # read mbr in wiki for more details | |
dd if=$DEVICE_TO_BACKUP of=mbr count=1 bs=512 | |
sfdisk -d $DEVICE_TO_BACKUP > partition.sfdisk |