Skip to content

Instantly share code, notes, and snippets.

@ziogaschr
ziogaschr / debian-wvdial-ppp0-interface-autossh.markdown
Last active July 31, 2023 13:50
Reverse proxy over 3G modem (draft)

Reverse proxy over 3G modem (draft)

We will explain how to configure a cubieboard running debian as a reverese proxy. The modules that will be used are wvdial and autossh

Credits goes to:

1. http://blog.rootshell.be/2015/02/19/my-little-pwnie-box/
2. https://wiki.archlinux.org/index.php/3G_and_GPRS_modems_with_pppd
@ziogaschr
ziogaschr / cubieboard-poweroff-debian.markdown
Last active April 9, 2017 08:39
Use cubieboard power button for poweroff on Debian

Use cubieboard power button for poweroff on Debian

install acpid

sudo apt-get install acpid

listen on power button press and execute powerbtn.sh

pico /etc/acpi/events/power

@ziogaschr
ziogaschr / easyiosapps
Last active August 29, 2015 14:13 — forked from fbeeper/easyiosapps
#!/bin/bash
#
# Using the information available in the new iOS8 simulator for each
# device/runtime (device.plist), this script creates a readable folder structure
# (no UDIDs, just simple device/runtime names). Inside that structure it creates
# soft links to your apps in development.
#
# You can run this script every time you install an app to your simulator, or
# you can simply call it to access this folder making sure it will always be
# updated :)
#!/bin/bash
# credits to: https://gist.github.com/2called-chaos/4285767
# Install:
# curl -O https://gist.githubusercontent.com/ziogaschr/74884b8d5095c86a7cef/raw/d236c87d89a34b588f37838843279e8e02f073e9/setup-autossh-tunnel.sh
# chmod u+x setup-autossh-tunnel.sh
# ./setup-autossh-tunnel.sh
#
# Extra:
# it is good to make a new user on both host and remote (http://linuxaria.com/howto/permanent-ssh-tunnels-with-autossh)
# useradd -m -s /bin/false autossh
// Media Queries in Sass 3.2
//
// These mixins make media queries a breeze with Sass.
// The media queries from mobile up until desktop all
// trigger at different points along the way
//
// And important point to remember is that and width
// over the portrait width is considered to be part of the
// landscape width. This allows us to capture widths of devices
// that might not fit the dimensions exactly. This means the break
@ziogaschr
ziogaschr / Sass-mixins.scss
Created June 13, 2014 16:26
SASS: basic mixins
// by Chris Coyier, Some Mini Sass Mixins I Like
// http://codepen.io/chriscoyier/blog/some-mini-sass-mixins-i-like
@mixin centerer {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
@ziogaschr
ziogaschr / js_add_to_cart_popup.js
Last active December 30, 2015 11:19
JS: Force showing a popup video to user before adding item to cart
/**
* Force showing a popup video to user before adding item to cart
* Use Case: Stokke Tripp-Trapp
*/
$(document).ready(function () {
var success_hash = 'tripptrapp-success';
// check if this is the success page
if(window.location.hash.substring(1) == success_hash) {
#!/bin/sh
# Disable BT on local machine and enable it on remote machine, so KB/Mouse reconnect to remote machine.
#ensure local bluetooth is off
/usr/local/bin/blueutil off
#enable imac bluetooth
ssh destiny@Chriss-iMac.local '/usr/local/bin/blueutil on'
#!/usr/bin/env bash
# file: ~/.virtualenvs/postmkvirtualenv
# This hook is run after a new virtualenv is activated.
# setup python interpretor and sitepackages
# for Sublime Text's SublimeCodeIntel plugin.
# codeintel looks in the root of any folder opened via `subl foldername`
# for foldername/.codeintel/config
# it also looks in ~/.codeintel/config