Skip to content

Instantly share code, notes, and snippets.

View kevinrodbe's full-sized avatar
⚛️
Building Things

Kevin Rodríguez kevinrodbe

⚛️
Building Things
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="UTF-8">
<title>Drawing Tools</title>
<script type="text/javascript"
src="http://maps.google.com/maps/api/js?sensor=false&libraries=drawing"></script>
<style type="text/css">
#map, html, body {
@kevinrodbe
kevinrodbe / deploy.php
Last active August 29, 2015 14:26 — forked from krisnoble/deploy.php
A slightly modified version of Brandon Summers' script. For more information: http://simianstudios.com/blog/post/using-bitbucket-for-automated-deployment-of-multiple-repositories
<?php
date_default_timezone_set('Europe/London'); // Set this to your local timezone - http://www.php.net/manual/en/timezones.php
/**
* The root directory where the repos live.
*
* @var string
*/
$root_dir = '/your/root/dir/';
@kevinrodbe
kevinrodbe / readme.md
Last active August 29, 2015 14:27 — forked from coolaj86/how-to-publish-to-npm.md
How to publish packages to NPM

Getting Started with NPM (as a developer)

If you haven't already set your NPM author info, now you should:

npm set init.author.name "Your Name"
npm set init.author.email "you@example.com"
npm set init.author.url "http://yourblog.com"

npm adduser

@kevinrodbe
kevinrodbe / README.md
Last active August 29, 2015 14:27 — forked from HenrikJoreteg/README.md
Minimalist routing in Redux

Why would you want to do this? Because you often don't need more. It's nice to not have to think about your "router" as this big special thing.

Instead, with this approch, your app's current pathname is just another piece of state, just like anything else.

This also means that when doing server-side rendering of a redux app, you can just do:

var app = require('your/redux/app')
var React = require('react')
@kevinrodbe
kevinrodbe / 00.howto_install_phantomjs.md
Last active September 22, 2015 02:30 — forked from julionc/00.howto_install_phantomjs.md
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@kevinrodbe
kevinrodbe / Preferences.sublime-settings
Last active January 24, 2018 18:32
Package for sublimetext 3 / 2
{
"Seti_SB_bright": true,
"Seti_SB_med": true,
"Seti_bold_slctdfile_labels": true,
"Seti_no_bar_undertabs": false,
"Seti_orange_button": true,
"Seti_orange_label": true,
"Seti_sb_no_icons": false,
"Seti_show_group_arrows": true,
"Seti_orange_button":true,
@kevinrodbe
kevinrodbe / 20-comandos-linux.md
Last active July 5, 2019 07:02
Lista de comandos básicos para la terminal
  • bash: sí, hay muchos que usan csh, zsh, sh, ... para mi, bash junto con su sistema de scripting es indispensable.
  • find: para encontrar ficheros con miles de parámetros. Muy útil.
  • grep: para encontrar información dentro de uno o varios ficheros.
  • sed: modificar el contenido de un fichero desde línea de comandos con expresiones regulares.
  • top: permite ver el estado del sistema, htop también es bastante bueno.
  • ps: permite ver los procesos ejecutándose en el sistema.
  • pstree: permite ver los procesos ordenados por jerarquías de ejecución (quien lanzó qué proceso)
  • tree: presenta los ficheros en forma de árbol
@kevinrodbe
kevinrodbe / footer.php
Created December 27, 2015 08:55 — forked from sapegin/footer.php
RequireJS in Wordpress theme

Right now I am working on a project where I am using bootstrap 3 and skrollr, it did not make my life harder, just use skrollr like you would use it normally, still pay attention when you rewrite the css. What I suggest for the mobile version is to turn skrollr off and make it a static website, and also don`t manually type the data attributes in the markup, use javascript for it. if you use javascript you can recalculate the the value you give in the data attribute when the window is resized.

Script

//used to set dynamically the attributes for animations
var setSkrollr = function($el, data) {
    // loop all data entries (scroll positions + css property & value)
    for (var i = 0, l = data.length; i < l; i++) { 
         // the current data entry
 var d = data[i]
var tools = {
    /**
     * @param el is the rect element ex $('.rect')
     */
    getRectLength: function(el) {
        var w = el.attr('width');
        var h = el.attr('height');
        return (w * 2) + (h * 2);
    },