Skip to content

Instantly share code, notes, and snippets.

Pierangelo pierangelo1982

Block or report user

Report or block pierangelo1982

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@pierangelo1982
pierangelo1982 / DateTimeHelper.java
Created Nov 8, 2016
java/android date time helper
View DateTimeHelper.java
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TimeZone;
import android.util.Log;
/**
* Utility class for parsing and formatting dates and times.
*
@pierangelo1982
pierangelo1982 / extract_emails_from_text.py
Last active Jul 6, 2016 — forked from dideler/extract_emails_from_text.py
A python script for extracting email addresses from text files.You can pass it multiple files. It prints the email addresses to stdout, one address per line.For ease of use, remove the .py extension and place it in your $PATH (e.g. /usr/local/bin/) to run it like a built-in command.
View extract_emails_from_text.py
#!/usr/bin/env python
#
# Extracts email addresses from one or more plain text files.
#
# Notes:
# - Does not save to file (pipe the output to a file if you want it saved).
# - Does not check for duplicates (which can easily be done in the terminal).
#
# (c) 2013 Dennis Ideler <ideler.dennis@gmail.com>
@pierangelo1982
pierangelo1982 / simpleadaptor
Last active Aug 29, 2015 — forked from oceantear/simpleadaptor
How to use Bitmap in listview
View simpleadaptor
package com.sadaptor;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import android.os.Bundle;
import android.os.Environment;
import android.app.Activity;
View 01_step.sh
rails g scaffold Book title:string description:text
rails g scaffold Pubhouse title:string address:text
rails g model BookPubhouse book_id:integer pubhouse_id:integer
rake db:migrate
View 01_step.sh
rails g scaffold Book title:string description:text
rails g scaffold Pubhouse title:string address:text
rails g model BookPubhouse book_id:integer pubhouse_id:integer
rake db:migrate
You can’t perform that action at this time.