Skip to content

Instantly share code, notes, and snippets.

View genoma's full-sized avatar

Alessandro Vioni genoma

View GitHub Profile
@genoma
genoma / README.md
Last active June 21, 2022 16:43
Build OpenVPN on MacOSX

Basic steps to compile OpenVPN with LibreSSL or OpenSSL

Clone the OpenVPN repository (master or checkout a TAG to build stable release)

$ git clone https://github.com/OpenVPN/openvpn.git

Install dependencies with HOMEBREW

$ brew install automake autoconf libtool pkg-config libressl openssl lzo lz4

@genoma
genoma / add.ovpn.configuration
Last active May 7, 2017 11:43
AirVpn configuration for OSX
# add it before the <ca> around line 20
# of your downloaded ovpn file
script-security 2
up "/users/{home}/connect.sh"
down "/users/{home}/disconnect.sh"
// *****************************************************************
// DEPENDENCIES
import fs from 'fs';
import path from 'path';
import gulp from 'gulp';
let use = taskname => require(`./tasks/gulp.${taskname}`);
let createTask = elem => gulp.task.apply(gulp, elem);
@genoma
genoma / view.coffee
Created September 10, 2014 14:23
Element is on view, return false, true
isScrolledIntoView = (elem) ->
docViewTop = $(window).scrollTop()
docViewBottom = docViewTop + $(window).height()
elemTop = $(elem).offset().top
elemBottom = elemTop + $(elem).height()
(elemBottom - 200 < docViewBottom) and (elemBottom + $(elem).height() > docViewBottom )
@genoma
genoma / launch.sh
Created July 15, 2014 15:26
Script to use pageres
#!/bin/bash
echo ""
echo -n "$(tput setaf 1)What script you'd like to launch? $(tput bold)[C = Cropped/N = Normal] $(tput sgr 0)"
read script
if [ "$script" = "n" ]; then
cat resolutions|pageres localhost:3000
else
cat resolutions|pageres localhost:3000 -c
@genoma
genoma / smart-resize.coffee
Created April 7, 2014 15:48
Debouncing function for jQuery .resize() in Coffeescript
## http://www.paulirish.com/2009/throttled-smartresize-jquery-event-handler/
## ---------------------------------------------
## debouncing function from John Hann
## http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
#
# (function($,sr){
# var debounce = function (func, threshold, execAsap) {
# var timeout;
# return function debounced () {
# var obj = this, args = arguments;
@genoma
genoma / configure.sh
Last active August 29, 2015 13:57
Compile Vim official source with MacPort python on Mac OSX correctly (vim/src/auto/configure)
# LINE 5781 change with
# then proceed as usual after a make distclean
vi_cv_path_python_plibs="-F/opt/local/Library/Frameworks -framework Python"
#!bin/bash
make clean
make distclean
./configure --enable-multibyte --with-tlib=ncurses --with-features=huge --enable-rubyinterp --enable-luainterp --enable-pythoninterp --with-lua-prefix=/usr/local --enable-gui=no --without-x --disable-netbeans --with-compiledby=jenoma@gmail.com --enable-fail-if-missing
@genoma
genoma / Gruntfile.js
Created February 27, 2014 12:11
Grunt configuration for Foundation 5 with coffeescript and grunt-newer
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
coffee: {
compileJoined: {
options: {
join: true
},
files: {
'js/app.js': ['coffeescripts/app.coffee', 'coffeescripts/*.coffee']
@genoma
genoma / safary-font-fix.sass
Last active December 25, 2015 16:19
Fix for Safari fonts going crazy with css3 transitions and absolute/fixed elements (SASS)
// FIX FOR SAFARI FONTS GOING CRAZY WITH TRANSITIONS AND FIXED ELEMENTS
body
-webkit-font-smoothing: subpixel-antialiased
-webkit-transform: translateZ(0)