Skip to content

Instantly share code, notes, and snippets.

View romulets's full-sized avatar
🦫
gophing around

Rômulo Farias romulets

🦫
gophing around
  • Elastic
  • Den Haag, Netherlands
  • 07:16 (UTC +02:00)
View GitHub Profile
@romulets
romulets / double-linked-list.go
Last active August 12, 2023 12:21
Quick implementation of a Queue (and Stack) using a double linked listed under the hood in go
type doubleLinkedList struct {
head *linkedNode
tail *linkedNode
size int
}
type linkedNode struct {
val int
next *linkedNode
prev *linkedNode
@romulets
romulets / lg
Created November 7, 2017 17:58
List Grep: Show all occurrences of your search in a path
#!/bin/bash
# Author: Rômulo Farias
# Year: 2017
# Name: List Grep
# Description: show all occurrences of your search in a path
# Usage: lg [optional dir] searchString
# Installation: copy this file to /bin and give it execution permission
if [ $# -eq 0 ]; then
echo "This script must take at least 1 param"
@romulets
romulets / tsconfig.json
Created December 28, 2016 16:12
To @gsantiango
{
"compilerOptions": {
"module": "AMD",
"noImplicitAny": false,
"removeComments": true,
"preserveConstEnums": true,
"sourceMap": true,
"outFile": "./dist/scripts/checkers.js"
},
"exclude": [
@romulets
romulets / StringIncrementable.cs
Created November 14, 2016 12:16
Increments a string like Excel [A ... AA ... AAA ... AAAA]
class StringIncrementable
{
public static string Increment(string strFrom)
{
char[] letters = new char[strFrom.Length + 1];
int i;
for (i = 0; i < strFrom.Length; i++)
letters[i] = strFrom[i];