I hereby claim:
- I am cmelgarejo on github.
- I am cmelgarejo (https://keybase.io/cmelgarejo) on keybase.
- I have a public key whose fingerprint is 7BFE E460 E7D2 ADFA EC30 AE9B 67DF C07E 8513 D232
To claim this, I am signing this object:
var arr = [[1,2,[3]],4,[5,[6.2]]]; | |
var result = []; | |
function flattenWithMap(array) { | |
//Convert the array to a flat string, split it using commas, and map it using | |
//the "Number" function to convert each element back to Integer :) | |
if(array.constructor === Array) | |
return array.toString().split(',').map(Number); | |
else | |
return array; |
I hereby claim:
To claim this, I am signing this object:
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
# Author: vhanla, modded by: cmelgarejo | |
# original source: https://gist.github.com/vhanla/da6c061591f419be74e60c7cc09b16b5#file-profile-ps1 | |
#Force coloring of git and npm commands | |
$env:TERM = "cygwin" | |
$env:TERM = "FRSX" | |
$env:TERM = "msys" | |
$global:foregroundColor = 'white' |
$ mkdir go-gql-server | |
$ cd go-gql-server | |
/go-gql-server $ |
package server | |
import ( | |
"log" | |
"github.com/gin-gonic/gin" | |
"github.com/cmelgarejo/go-gql-server/internal/handlers" | |
) | |
var HOST, PORT string |
package main | |
import ( | |
"github.com/cmelgarejo/go-gql-server/pkg/server" | |
) | |
func main() { | |
server.Run() | |
} |
#!/bin/sh | |
srcPath="cmd" | |
pkgFile="main.go" | |
outputPath="build" | |
app="gql-server" | |
output="$outputPath/$app" | |
src="$srcPath/$app/$pkgFile" | |
printf "\nBuilding: $app\n" | |
time go build -o $output $src |
/go-gql-server $ .scripts/build.sh | |
Building: gql-server | |
real 0m0.317s | |
user 0m0.531s | |
sys 0m0.529s | |
Built: gql-server size:16M |
/go-gql-server $ chmod +x scripts/build.sh |