Skip to content

Instantly share code, notes, and snippets.

View hlecuanda's full-sized avatar
😡
Mirroring gitlab on ActiveGithub.NET 2019 Ultimate Enterprise EULA Live

H-Lo hlecuanda

😡
Mirroring gitlab on ActiveGithub.NET 2019 Ultimate Enterprise EULA Live
View GitHub Profile
@hlecuanda
hlecuanda / Git-Squash-Implementation.md
Last active April 7, 2024 02:46
Git Squash alias, from amazingly clean explanation on stackoverflow

From This other answer on the same thread

Based on Chris Johnsen's answer:

I added this line to the [alias] section of my git config file (~/.gitconfig):

squash = "!f(){ git reset --soft HEAD~${1} && git commit --edit -m\"$(git log --format=%B --reverse HEAD..HEAD@{1})\"; };f"
@hlecuanda
hlecuanda / GAS-Trigger-TestingFunction.gs
Created August 19, 2015 08:32
A pattern to debug google apps script (GAS) triggered functions.
/**
* Test function for onEdit. Passes an event object to simulate an edit to
* a cell in a spreadsheet.
*
* Check for updates: http://stackoverflow.com/a/16089067/1677912
*
* See https://developers.google.com/apps-script/guides/triggers/events#google_sheets_events
*
* on Script editor, set to debug THIS function, but create breakpoints
* on the onEdit Function
@hlecuanda
hlecuanda / parsemake.zsh
Created August 24, 2015 22:57
quick zsh function to parse a makefile, wrote it on the command line. the grep expression does the magic
cat bsd.commands.mk |
grep -v -Ee "^\#|^$|^_|^\.|\@|^PKG|builtin" |
while read line
do
CMD=`echo $line | tr -s "\t" | cut -f2 | cut -f1 -d\ `
stat $CMD 1>>/dev/null 2>>/dev/null
if (($? )) then
echo "${CMD} failed"
else
echo "${CMD} ok"
@hlecuanda
hlecuanda / The Technical Interview Cheat Sheet.md
Last active August 29, 2015 14:28 — forked from CheoR/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@hlecuanda
hlecuanda / image_displayhook.ipynb
Last active August 25, 2015 22:14 — forked from deeplook/image_displayhook.ipynb
An IPython notebook playing with display hook functions to display PIL images and Reportlab drawings.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hlecuanda
hlecuanda / math.md
Last active June 12, 2017 20:13
Propiedades de las integrales indefinidas

Propiedades de las integrales indefinidas

$$\int_a^b f(x)dx = -\int_b^a f(x)dx$$

$$\int_a^b f(x) + g(x) dx = \int_a^b f(x) +\int_a^b g(x) dx $$

$$ \int_a^b k \dot f(x) dx = k \dot \int_a^b f(x) dx $$

@hlecuanda
hlecuanda / Code.gs
Last active May 24, 2018 13:36
Custom formula in Google Apps Script (GAS) to extract the formula used in a cell (G Suite Sheets)
/**
* Extract formula from a cell
*
* @param {reference} a cell reference from which to extract the formula
* @return a string representation of the formula in {reference}
* @customfunction
*/
function CELLFORMULA(reference) {
var ss = SpreadsheetApp;
@hlecuanda
hlecuanda / README.md
Created October 28, 2016 17:28
Mapa de Mexico para colorear usando Google Charts JS API

Mapa de Mexico para colorear con google chars js api.

El archiv html va en tu documento, el JS puede cargarse afuera u antes de la llamada a los bloques html.

produce esto / your get tomething like this:

https://goo.gl/kPIMZR (jsfiddle)

Mapa de Mexico

@hlecuanda
hlecuanda / .block
Last active December 15, 2016 08:48 — forked from mbostock/.block
Treemap
border: no
height: 600
license: gpl-3.0
@hlecuanda
hlecuanda / .block
Last active December 15, 2016 09:12 — forked from mbostock/.block
Sunburst Partition
license: gpl-3.0