Skip to content

Instantly share code, notes, and snippets.

View renesansz's full-sized avatar
🎯
Focusing

Rene Padillo renesansz

🎯
Focusing
View GitHub Profile
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
@renesansz
renesansz / sample-chart.js
Created March 30, 2015 00:37
Sample implementation for Chart.js
var ctx = document.getElementById("graph").getContext("2d");
var data = {
labels: ["2011", "2012", "2013"],
datasets: [
{
label: "Trainer Score",
fillColor: "rgba(220,220,220,0.2)",
strokeColor: "rgba(220,220,220,1)",
pointColor: "rgba(220,220,220,1)",
pointStrokeColor: "#fff",
@renesansz
renesansz / vhosts.conf
Last active August 29, 2015 14:17
Basic vhost file
# Change * or port 80 as needed
<VirtualHost *:80>
DocumentRoot "path\to-nowhere"
ServerName your-server-name-here # Sample: mywebsite.com
<Directory "path\to-nowhere">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
@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.
#
@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:32
.htaccess w/ Gzip Setting [From HTML5 Boilerplate]
# ######################################################################
# # WEB PERFORMANCE #
# ######################################################################
# ----------------------------------------------------------------------
# | Compression |
# ----------------------------------------------------------------------
<IfModule mod_deflate.c>
@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 / .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 / 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 / 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