Skip to content

Instantly share code, notes, and snippets.

View gsscoder's full-sized avatar
💭
obsessive coding disorder

coder (π³) gsscoder

💭
obsessive coding disorder
View GitHub Profile
@gsscoder
gsscoder / rebar3_getdeps_yfinance.out
Created December 22, 2019 15:01
YFinance-LFE actual rebar3 get-deps output
===> Verifying dependencies...
===> Fetching clj (from {git,"git://github.com/lfex/clj.git"})
===> WARNING: It is recommended to use {branch, Name}, {tag, Tag} or {ref, Ref}, otherwise updating the dep may not work as expected.
===> Fetching lfe-compile (from {git,"https://github.com/lfe-rebar3/compile.git",
{tag,"0.5.0"}})
===> Fetching lfe (from {git,"https://github.com/rvirding/lfe.git",
{ref,"697e9b4996fa843f4c6a9edea25005d30a9b8a14"}})
===> Compiling lfe
_build/default/plugins/lfe/src/lfe_macro_include.erl:28: Warning: export_all flag enabled - all functions will be exported
@gsscoder
gsscoder / tidwall_gjson.go
Last active December 21, 2019 14:11
Go program that parses JSON with tidwall/gjson
package main
import (
"fmt"
"github.com/tidwall/gjson"
)
var data = `
{
@gsscoder
gsscoder / buger_jsonparser.go
Last active December 21, 2019 13:37
Go program that parses JSON with buger/jsonparser
package main
import (
"fmt"
"github.com/buger/jsonparser"
)
var data = []byte(`
{
@gsscoder
gsscoder / pickall_search_of_searches.fsx
Last active December 19, 2019 06:41
F# scripts that uses output of a first search to perform the second
(*
* pickall_search_of_searches.fsx
* - F# Script that demonstrates the use of PickAll (github.com/gsscoder/pickall)
* - Searches the web adding the first two more used words in initial results
* - descriptions for a subsequent query
* - Requires PickAll.dll (0.8.0) and AngleSharp.dll (0.14.0-alpha-787)
* in the script directory
*)
#r "PickAll.dll"
open System
@gsscoder
gsscoder / Facebook_PickAll_Searcher.cs
Last active December 18, 2019 16:16
Facebook searcher temporarily removed from PickAll source
/*
* Facebook_PickAll_Searcher.cs
* Facebook searcher for PickAll (github.com/gsscoder/pickall)
* Removed from repository, still pluggable as external service
*/
using System;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
@gsscoder
gsscoder / pickall_count_words.fsx
Last active December 19, 2019 06:25
F# script that searches the web using PickAll and counts the words of results descriptions
(*
* pickall_count_words.fsx
* - F# Script that demonstrates the use of PickAll (github.com/gsscoder/pickall)
* - Searches the web and counts the words of results descriptions
* - Requires PickAll.dll (0.8.0) and AngleSharp.dll (0.14.0-alpha-787)
* in the script directory
*)
#r "PickAll.dll"
open System
open Microsoft.FSharp.Control
@gsscoder
gsscoder / alive.go
Last active December 17, 2019 05:19
Go goroutine and channel to monitor process end
// compile: go build -o alive
// usage:
// $ ps -A | rg firefox
// 35761 ?? 0:23.28 /Applications/Firefox.app/Contents/MacOS/firefox
// ./alive 35761
package main
import (
"fmt"
@gsscoder
gsscoder / endless.go
Last active December 20, 2019 06:27
Infinity loop written in Go to check CPU usage
package main
import (
"fmt"
"time"
)
func main() {
for {
time.Sleep(time.Second) // comment this to overload the CPU
@gsscoder
gsscoder / ProcessEnd.cs
Created December 13, 2019 10:53
Demonstrates how to detect end of a running process
// purpose: detect process end
// demo:
// - launch firefox
// - launch this program
// - close firefox and see 'died'
// notes:
// - may need sudo on *nix systems
using System;
using System.Diagnostics;
@gsscoder
gsscoder / settings_vscode.json
Last active August 19, 2020 15:39
VSCode User Settings
{
"terminal.integrated.rendererType": "dom",
"python.pythonPath": "/Users/coder/.pyenv/shims/python",
"window.zoomLevel": 0,
"workbench.startupEditor": "none",
"[python]": {
"editor.rulers": [
72, 79
],