Skip to content

Instantly share code, notes, and snippets.

View Xhamps's full-sized avatar
:octocat:
Learning

Raphael Araujo Xhamps

:octocat:
Learning
View GitHub Profile
@Xhamps
Xhamps / getPhoneGapPath
Created January 28, 2014 14:27
Capture the path of app
function getPhoneGapPath(){
var path = window.location.pathname;
path = path.substr( path, path.length - 10 );
return 'file://' + path;
};
@Xhamps
Xhamps / line-clamp.scss
Last active August 29, 2015 13:58
Line Clamp
$font-size: 26px;
$line-height: 1.4;
$lines-to-show: 3;
h2 {
display: block; /* Fallback for non-webkit */
display: -webkit-box;
max-width: 400px;
height: $font-size*$line-height*$lines-to-show; /* Fallback for non-webkit */
margin: 0 auto;
@mixin absolute($args) {
/**
* List of offsets to check for in $args
*/
$offsets: top right bottom left;
/**
* We loop through $offsets to deal with them one by one
*/
@each $o in $offsets {
@Xhamps
Xhamps / background-noise.css
Created May 29, 2014 15:08
Background Noise
.background-noise {
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAL9UlEQ…VAIzdjVaI2JThjPnc53sRatofWsn3fcZjj3UZvGnQj9T/K9Nz+4c/hUQAAAABJRU5ErkJggg==);
opacity: 0.85;
}
@Xhamps
Xhamps / index.html
Last active August 29, 2015 14:02
Label/Placeholder
<form class="form-horizontal">
<div class="control-group">
<input type="text" class="form-control" id="inputEmail" placeholder="" required>
<label class="control-label" for="inputEmail">Email</label>
</div>
<div class="control-group">
<input type="password" class="form-control" id="inputPassword" placeholder="" required>
<label class="control-label" for="inputPassword">Password</label>
</div>
<div class="control-group">
@Xhamps
Xhamps / remove-bom.php
Created June 13, 2014 20:14
Remove Bom
<?php
// Tell me the root folder path.
// You can also try this one
// $HOME = $_SERVER["DOCUMENT_ROOT"];
// Or this
// dirname(__FILE__)
$HOME = dirname(__FILE__);
// Is this a Windows host ? If it is, change this line to $WIN = 1;
$WIN = 0;
@Xhamps
Xhamps / vertical_centering.css
Created June 29, 2014 12:43
CSS Vertical Centering
.children{
background: #ffdb4c;
height: 300px;
position: relative;
top: 50%;
transform: translateY(-50%);
}
@Xhamps
Xhamps / basic
Last active August 29, 2015 14:14
PM2 + Git + Proxy reverso como método de deploy
//Tutorial https://www.youtube.com/watch?v=h39l3th5Gkg&list=WL&index=2
//Updata machine and install dependeces
sudo apt-get update
sudo apt-get install nodejs
sudo apt-get install nodejs-legacy
sudo apt-get install npm
sudo apt-get install git
sudo apt-get install htop
Project # of Top 100 Free Apps (US)
facebook-ios-sdk 67
Bolts-iOS 48
AFNetworking 39
Google-Mobile-Ads-SDK 38
Reachability (Apple) 38
Crashlytics 37
Flurry-iOS-SDK 31
CocoaPods 30
GoogleConversionTracking 29