Skip to content

Instantly share code, notes, and snippets.

View paolodina's full-sized avatar
🔋
always on

Paolo Dina paolodina

🔋
always on
  • Italy
  • 10:55 (UTC +02:00)
View GitHub Profile
@paolodina
paolodina / SassMeister-input-HTML.html
Created May 17, 2015 16:37
Generated by SassMeister.com.
<main>
<header>
<h1>Web Typography</h1>
<h1>Demystified</h1>
</header>
<h1>A section</h1>
<section>
<h2>Section heading</h2>
<p>A paragraph: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
@paolodina
paolodina / bcrypt webfaction
Last active October 3, 2016 20:45
pip install bcrypt on Webfaction
cd ~/tmp/
wget ftp://sourceware.org/pub/libffi/libffi-3.2.1.tar.gz
tar zxf libffi-3.2.1.tar.gz
cd ~/tmp/libffi-3.2.1
./configure --prefix=/home/user/tmp/libffi
make
make install
PKG_CONFIG_PATH=/home/user/tmp/libffi/lib/pkgconfig/ LD_LIBRARY_PATH=/home/user/tmp/libffi/lib/ pip install bcrypt
Finally add LD_LIBRARY_PATH information to Apache's start script (located in /home/user/webapps/foobar/apache2/bin)
@paolodina
paolodina / Facebook sdk for Python 3
Created August 29, 2015 17:24
2to3 - Facebook sdk on Python 3
#!/usr/bin/env python
#
# Copyright 2010 Facebook
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@paolodina
paolodina / error.log
Created September 15, 2015 23:04
Apache mod_rewrite error log
PHP Warning: Module 'xdebug' already loaded in Unknown on line 0
[Tue Sep 15 23:00:06.762394 2015] [mpm_prefork:notice] [pid 3902] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.11 configured -- resuming normal operations
[Tue Sep 15 23:00:06.762460 2015] [core:notice] [pid 3902] AH00094: Command line: '/usr/sbin/apache2'
[Tue Sep 15 23:00:10.512779 2015] [rewrite:trace3] [pid 3908] mod_rewrite.c(468): [client 10.0.2.2:38666] 10.0.2.2 - - [127.0.0.1/sid#7f76b1984de0][rid#7f76b18450a0/initial] [perdir /var/www/myproject/] strip per-dir prefix: /var/www/myproject/ ->
[Tue Sep 15 23:00:10.513543 2015] [rewrite:trace3] [pid 3908] mod_rewrite.c(468): [client 10.0.2.2:38666] 10.0.2.2 - - [127.0.0.1/sid#7f76b1984de0][rid#7f76b18450a0/initial] [perdir /var/www/myproject/] applying pattern '.' to uri ''
[Tue Sep 15 23:00:10.513682 2015] [rewrite:trace1] [pid 3908] mod_rewrite.c(468): [client 10.0.2.2:38666] 10.0.2.2 - - [127.0.0.1/sid#7f76b1984de0][rid#7f76b18450a0/initial] [perdir /var/www/myproject/] pass throu
(foo)paolo@tk:tmp $ speedtest
Retrieving speedtest.net configuration...
Retrieving speedtest.net server list...
Testing from Vodafone Italia DSL (xxx.xxx.xxx.xxx)...
Selecting best server based on latency...
b'Hosted by ItaliaOnline (Milan) [36.29 km]: 80.79 ms'
Testing download speed........................................
Download: 11.47 Mbit/s
Testing upload speed..................................................
Upload: 0.70 Mbit/s
# hello
@paolodina
paolodina / oneflow.md
Created September 11, 2016 10:10 — forked from jbrodriguez/oneflow.md
a git branching model (one branch / original + hybrid variant) WIP

oneflow

A flow based on this article

Comments from Adam on the original version of this gist can be found here

Original approach

Feature branches

@paolodina
paolodina / gist:59ef468cda1f46882ec5113ed7b0b283
Created January 5, 2017 11:24 — forked from minostro/gist:11387989
Configuring Nginx on Webfaction

1.- Get into the src folder, download & extract nginx source

  • cd ~/src
  • curl -O http://nginx.org/download/nginx-1.7.0.tar.gz
  • tar -xzvf nginx-1.7.0.tar.gz
  • cd nginx-1.7.0

2.- Configuring the source

./configure --prefix=$HOME/local/nginx \

@paolodina
paolodina / git-log-to-tsv.sh
Created July 12, 2017 21:35 — forked from pwenzel/git-log-to-tsv.sh
Git Log to Tab-Delimited CSV File
# Local Dates:
git log --date=local --pretty=format:"%h%x09%an%x09%ad%x09%s" > commits.local.tsv.txt
# ISO Dates:
git log --date=iso --pretty=format:"%h%x09%an%x09%ad%x09%s" > commits.iso.tsv.txt
@paolodina
paolodina / vimrc
Created January 10, 2018 03:09
Basic / Simple vimrc config file
set nocompatible
set encoding=utf-8
set hidden
filetype plugin indent on
syntax on
set synmaxcol=2048 " Don't syntax highlight super-long lines (for performance)
set autoindent " automatically indent lines and try to do it intelligently
set smartindent
set backspace=indent,eol,start " backspace behaves 'normally'