Skip to content

Instantly share code, notes, and snippets.

View hookdump's full-sized avatar
🏠
Working from home

Ignacio hookdump

🏠
Working from home
View GitHub Profile
@hookdump
hookdump / effectiveTypescriptExamples.md
Created September 5, 2024 05:01
Effective Typescript Summary: 83 tips as code examples

1. Getting to Know TypeScript

Item 1: Understand the Relationship Between TypeScript and JavaScript

function add(a: number, b: number): number {
  return a + b;
}
// The above TypeScript function is translated directly to JavaScript.
@hookdump
hookdump / .zshrc
Created April 18, 2023 20:51
Ask ChatGPT in ZSH
# Paste your OpenAI API Key here
export OPENAI_API_KEY="sk-..."
# Display colors
RED='\033[0;31m'
NC='\033[0m' # No Color
# GPT function
function gpt {
set +o nomatch # disable nomatch option
@hookdump
hookdump / .zshrc
Created June 27, 2022 20:39
Auto-load .nvmrc
# place this after nvm initialization!
autoload -U add-zsh-hook
load-nvmrc() {
local node_version="$(nvm version)"
local nvmrc_path="$(nvm_find_nvmrc)"
if [ -n "$nvmrc_path" ]; then
local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")")
if [ "$nvmrc_node_version" = "N/A" ]; then

Filosofía CBC - Comisión 24202 (Lun y Jue de 9 a 11hs)

Datos varios

Modalidad

Los encuentros sincrónicos (videollamada) son los Jueves de 9 a 10hs.

Ingresar acá: https://meet.google.com/rmh-dgwy-bru

@hookdump
hookdump / stream.js
Created January 10, 2020 18:58
Monitorear tuits
var Twit = require('twit')
var T = new Twit({
consumer_key: '***',
consumer_secret: '***',
access_token: '***',
access_token_secret: '***',
timeout_ms: 60*1000,
})
@hookdump
hookdump / markdown.component.ts
Created September 7, 2017 12:35 — forked from istupakov/markdown.component.ts
Angular 4 Markdown Component with Router Navigation.
import { Component, Input, ViewChild, AfterViewInit, ElementRef } from '@angular/core';
import { Router } from '@angular/router';
import { markdown } from 'markdown';
@Component({
selector: 'markdown',
template: `<div [innerHtml]="html" #root></div>`
})
export class MarkdownComponent implements AfterViewInit {
@ViewChild('root') root: ElementRef;
@hookdump
hookdump / increment_build_number.js
Created July 4, 2017 02:56
Cordova hook for incrementing build numbers
#!/usr/bin/env node
// Save hook under `project-root/hooks/before_prepare/`
//
// Don't forget to install xml2js using npm
// `$ npm install xml2js`
var fs = require('fs');
var xml2js = require('xml2js');
@hookdump
hookdump / automount-shared.sh
Created May 15, 2017 02:35
automount-vbox-shared
#!/bin/sh
#-----------------------------------------------------------------------------
# Discover VirtualBox shared folders and mount them if it makes sense
#-----------------------------------------------------------------------------
if ! type VBoxControl > /dev/null; then
echo 'VirtualBox Guest Additions NOT found' > /dev/stderr
exit 1
fi