Skip to content

Instantly share code, notes, and snippets.

View renesansz's full-sized avatar
🎯
Focusing

Renemari Padillo renesansz

🎯
Focusing
View GitHub Profile
@renesansz
renesansz / .bashrc
Created January 21, 2015 06:15
Auto start SSH-Agent (Windows Git) and load SSH Keys.
SSH_ENV="$HOME/.ssh/environment"
# start the ssh-agent
function start_agent {
echo "Initializing new SSH agent..."
# spawn ssh-agent
ssh-agent | sed 's/^echo/#echo/' > "$SSH_ENV"
echo succeeded
chmod 600 "$SSH_ENV"
. "$SSH_ENV" > /dev/null
@renesansz
renesansz / array-filter.js
Created January 23, 2015 07:47
Remove duplicates in Javascript Array
(function() {
var duplicatesArray = ['stop', 'pause', 'resume', 'stop'];
// Filter function returns a new array
var uniqueArray = duplicatesArray.filter(function(ele, pos) {
return duplicatesArray.indexOf(ele) === pos;
});
// Expected Output: ['stop', 'pause', 'resume']
@renesansz
renesansz / makecert.bat
Created February 10, 2015 01:17
Generate a self-signed SSL in XAMPP
@echo off
SET /P FILENAME=Enter file name:(Default: server)
IF "%FILENAME%"=="" SET FILENAME=server
@echo off
set OPENSSL_CONF=./conf/openssl.cnf
if not exist .\conf\ssl.crt mkdir .\conf\%FILENAME%.crt
if not exist .\conf\ssl.key mkdir .\conf\ssl.key
@renesansz
renesansz / install.sh
Last active August 29, 2015 14:15
Some useful commands after installing Ubuntu based distro
#!/bin/bash
sudo -s
add-apt-repository -y ppa:apt-fast/stable
apt-get update
apt-get install apt-fast
add-apt-repository -y ppa:mozillateam/firefox-next
add-apt-repository -y ppa:djcj/vlc-stable
add-apt-repository -y ppa:danielrichter2007/grub-customizer
add-apt-repository -y ppa:versable/elementary-update
@renesansz
renesansz / Gruntfile.js
Last active August 29, 2015 14:15
Sample Gruntfile.js
module.exports = function(grunt) {
/**
* Load required Grunt tasks.
*/
require('load-grunt-tasks')(grunt); // This will allow as to execute `loadNPMTask` for tasks with naming pattern of `grunt-*`
require('time-grunt')(grunt);
/**
* The Grunt Configuration
@renesansz
renesansz / .jshintrc
Last active August 29, 2015 14:15
Basic .jshintrc file
{
"node": true, // Enable globals available when code is running inside of the NodeJS runtime environment.
"browser": true, // Standard browser globals e.g. `window`, `document`
"esnext": true, // Allow ES.next specific features such as `const` and `let`.
"bitwise": false, // Prohibit bitwise operators (&, |, ^, etc.).
"camelcase": false, // Permit only camelcase for `var` and `object indexes`.
"curly": false, // Require {} for every new block or scope.
"eqeqeq": true, // Require triple equals i.e. `===`.
"immed": true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );`
"latedef": false, // Prohibit variable use before definition.
@renesansz
renesansz / .htaccess
Last active December 20, 2016 00:46
.htaccess for Angular HTML5 Mode routing using Angular-UI
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(.*) /index.html [NC,L]
</IfModule>
@renesansz
renesansz / .htaccess
Created March 7, 2015 06:32
.htaccess w/ Gzip Setting [From HTML5 Boilerplate]
# ######################################################################
# # WEB PERFORMANCE #
# ######################################################################
# ----------------------------------------------------------------------
# | Compression |
# ----------------------------------------------------------------------
<IfModule mod_deflate.c>
@renesansz
renesansz / .htaccess
Last active August 29, 2015 14:16
.htaccess w/ File Access [From HTML5 Boilerplate]
# ----------------------------------------------------------------------
# | File access |
# ----------------------------------------------------------------------
# Block access to directories without a default document.
#
# You should leave the following uncommented, as you shouldn't allow
# anyone to surf through every directory on your server (which may
# includes rather private places such as the CMS's directories).
@renesansz
renesansz / .htaccess
Created March 7, 2015 06:36
.htaccess w/ Cross-Origin [From HTML5 Boilerplate]
# ######################################################################
# # CROSS-ORIGIN #
# ######################################################################
# ----------------------------------------------------------------------
# | Cross-origin requests |
# ----------------------------------------------------------------------
# Allow cross-origin requests.
#