Skip to content

Instantly share code, notes, and snippets.

Manuel A. Cerda espaciomore

Block or report user

Report or block espaciomore

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@espaciomore
espaciomore / watch.sh
Last active May 9, 2019
Watch command for Git Bash
View watch.sh
#!/bin/bash
ARGS="${@}"
clear;
while(true); do
OUTPUT=`$ARGS`
clear
echo -e "${OUTPUT[@]}"
done
@espaciomore
espaciomore / login.sh
Last active Mar 3, 2017
Login using Curl saving cookies file
View login.sh
#!/bin/bash
#TIMESTAMP=`date "+%Y%m%d_%H%M%S"`
FILTER="<title>"
REPLACEMENT="s/\s*<\/?title>\s*//g"
RESOURCE1=""
RESOURCE2=""
function get_cookie {
echo "POST $1/$RESOURCE1"
curl -d "$2" -H "Content-Type: application/x-www-form-urlencoded" -X POST "$1/$RESOURCE1" -s -c "cookie"
View pic.go
package main
import "golang.org/x/tour/pic"
func Pic(dx, dy int) [][]uint8 {
var p [][]uint8 = make([][]uint8, dy)
for i:=0;i<dy;i++ {
p[i] = make([]uint8, dx)
for j:=0;j<dx;j++ {
p[i][j] = uint8((j*i)/10)
@espaciomore
espaciomore / wordcount.go
Created Jan 1, 2017
Go Tour - Word Count
View wordcount.go
package main
import (
"golang.org/x/tour/wc"
"strings"
)
func WordCount(s string) map[string]int {
wordMap := make(map[string]int)
words := strings.Fields(s)
You can’t perform that action at this time.