Skip to content

Instantly share code, notes, and snippets.

View paolodina's full-sized avatar
🔋
always on

pdina paolodina

🔋
always on
  • 08:40 (UTC +02:00)
View GitHub Profile
@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

# hello
(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
@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
@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 / 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 / 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 / gist:e4decf215bfb1a82a4e0
Last active August 29, 2015 14:14
dump livecd customizations
#!/bin/bash
# used to backup a live cd session without persistence possibility
# (just forgot to run the live cd in persistent mode)
set -e
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
# http://askubuntu.com/a/99151/18140
@paolodina
paolodina / gist:44f660a393f0be49b6dc
Created December 10, 2014 21:33
Scriptino Attic + lvm snapshot
$ sudo ./runbackup.sh
[sudo] password for paolo:
Create into sysvg a snapshot of lvroot named backup_snapshot_root
Logical volume "backup_snapshot_root" created
Mounting root snapshot to filesystem...
Create into sysvg a snapshot of lvhome named backup_snapshot_home
Logical volume "backup_snapshot_home" created
Mounting home snapshot to filesystem...
Create into sysvg a snapshot of lvvar named backup_snapshot_var
Logical volume "backup_snapshot_var" created
@paolodina
paolodina / gist:9d26b5a32b0f6bd8cdb1
Created November 29, 2014 16:46
Backup script output
(attic)paolo@tk:~/local2/venvs/attic$ sudo ./runbackup.sh
[sudo] password for paolo:
Create into sysvg a snapshot of lvroot named backup_snapshot_root
Logical volume "backup_snapshot_root" created
Mounting root snapshot to filesystem...
Create into sysvg a snapshot of lvhome named backup_snapshot_home
Logical volume "backup_snapshot_home" created
Mounting home snapshot to filesystem...
Create into sysvg a snapshot of lvvar named backup_snapshot_var
Logical volume "backup_snapshot_var" created