Skip to content

Instantly share code, notes, and snippets.

Emilio G.C. iPotaje

Block or report user

Report or block iPotaje

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 css center div vertically and horizontally on page
/* */
.content {
position: absolute;
left: 50%;
top: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
iPotaje / gist:583e22e58d01a2b719ca8729fed67860
Created Nov 10, 2016
Move PDFs to parent directory and delete empty folders
View gist:583e22e58d01a2b719ca8729fed67860
mv */*.pdf .
find . -type d -empty -delete
View Copy all branches of a repo
git clone --bare url .git
[git clone --bare .git]
git config --bool core.bare false #switch the bare repo to a normal version of the repo
git reset --hard
View gist:1fca82b3d508781d8059827f041dc0a2

Use these rapid keyboard shortcuts to control the GitHub Atom text editor on Mac OSX.

Key to the Keys

  • ⌘ : Command key
  • ⌃ : Control key
  • ⌫ : Delete key
  • ← : Left arrow key
  • → : Right arrow key
  • ↑ : Up arrow key
iPotaje / example.js
Created Apr 19, 2016
Example of Sequelize with sql.js
View example.js
var lib = require('./patch.js');
var Sequelize = require('sequelize');
var sequelize = new Sequelize('sqlite://dbname', {dialectModulePath: 'sql.js'});
var User = sequelize.define('user', {
username: Sequelize.STRING,
birthday: Sequelize.DATE
iPotaje / gist:ef6d086fa17b0736b6a2
Created Nov 24, 2015
gulpfile.js For angular, angular-route, browserify, watchify and babelify
View gist:ef6d086fa17b0736b6a2
var gulp = require('gulp');
var dest = {
preDirectory : 'pre',
directory : 'dist',
bundle : '/' + 'all.js'
var src = {
webserver : '.',
View .jshintrc.js
// NOTE: I added the .js extension to this gist so it would have syntax highlighting. This file should have NO file extension
// Settings
"passfail" : false, // Stop on first error.
"maxerr" : 100, // Maximum error before stopping.
// Predefined globals whom JSHint will ignore.
"browser" : true, // Standard browser globals e.g. `window`, `document`.
View cache.js
var fs = require('fs');
//this is the path that QTNetwork classes uses for caching files for it's http client
//the path should be the one that has 16 folders labeled 0,1,2,3,...,F
exports.cachePath = '/path/to/phantomjs/cache/data/folder';
//this is the extension used for files in the cache path
exports.cacheExtension = "d";
//the resources that are to be saved
iPotaje / SQL
Last active Aug 29, 2015
SQL Cheatsheet
View SQL
iPotaje / gist:5744254
Last active Dec 18, 2015
.htaccess skeleton
View gist:5744254
DirectoryIndex index.php
FallbackResource /slim/new/index.php
You can’t perform that action at this time.