Skip to content

Instantly share code, notes, and snippets.

View gepser's full-sized avatar
:octocat:
Helping people

Gepser Hoil gepser

:octocat:
Helping people
View GitHub Profile
@gepser
gepser / iterm2-solarized.md
Created August 1, 2017 04:17 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

@gepser
gepser / The Technical Interview Cheat Sheet.md
Created April 17, 2017 16:26 — forked from tsiege/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.
@gepser
gepser / sed cheatsheet
Created February 21, 2017 00:01 — forked from un33k/sed cheatsheet
magic of sed -- find and replace "text" in a string or a file
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'
@gepser
gepser / color-go-output.sh
Created November 7, 2016 02:40
Give color to outputs when testing in Golang
go test -v . | sed ''/PASS/s//$(printf "\033[32mPASS\033[0m")/'' | sed ''/FAIL/s//$(printf "\033[31mFAIL\033[0m")/'' | sed ''/RUN/s//$(printf "\033[36mRUN\033[0m")/''
@gepser
gepser / loop_files_folders_recursively.go
Created September 7, 2016 03:38 — forked from francoishill/loop_files_folders_recursively.go
Loop through files and folders recursively in golang
package main
import (
"fmt"
"os"
"path/filepath"
)
func main() ([]string, error) {
searchDir := "c:/path/to/dir"
@gepser
gepser / apibluekite.js
Last active August 29, 2015 14:07
Workflow de node - Ubicando números por proveedor
//Recordar que los módulos van en config.json y allí se crean las variables para poder usarlos.
var restify = require('restify');
var http = require('http');
var workflow = module.exports = {
name: 'Looking for cellphone company',
chain: [
{
name: 'Create an account in TIGO',
timeout: 20,
@gepser
gepser / Read Monitors.js
Created September 29, 2014 22:24
Read Monitors NodeJs
var EventSource = require('eventsource');
var Wreck = require('wreck');
var parse = require('parse-link-header');
var qs = require('querystring');
var readableStream = qs.stringify({number:'54665160 '});
var options = {
payload: readableStream,
'Recibir un XML como un String
Private Function LoopXML(ByVal xml As String) As String
Try
Dim strSalida As String = ""
Dim nt As NameTable = New NameTable()
Dim nsmgr As XmlNamespaceManager = New XmlNamespaceManager(nt)
nsmgr.AddNamespace(String.Empty, "")
Dim context As XmlParserContext = New XmlParserContext(Nothing, nsmgr, Nothing, XmlSpace.None)
@gepser
gepser / Segundos_Laborales_Extremos.sql
Created November 29, 2013 14:50
Calcula el tiempo laboral entre dos fechas de un empleado.
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER FUNCTION [dbo].[Segundos_Laborales_Extremos] ( @empleado int, @fecha_inicial DATETIME, @fecha_final DATETIME)
RETURNS INT
AS
BEGIN
DECLARE @hora_inicio DATETIME, @hora_fin DATETIME
@gepser
gepser / Tiempo_Laboral.sql
Created November 28, 2013 16:16
La función obtiene el tiempo laboral en segundos de un empleado entre dos fechas. Usa las sub funciones https://gist.github.com/gepser/7694301 y https://gist.github.com/gepser/7694205.
/*
La función obtiene el tiempo laboral en segundos de un empleado entre dos fechas.
Esta función trabaja sobre una tabla de horarios por empleado donde cada empleado puede tener muchos horarios por día.
Se asume que no hay traslapes de horarios.
Un ejemplo de la tabla podría ser así:
dia|hora_inicio|hora_fin|empleado
2 |08:00 |13:00 |15