Skip to content

Instantly share code, notes, and snippets.

package main
import (
"fmt"
"math"
)
func main() {
myList := []int64{1,2,3,4,5,6,7,8,9}
@aceakash
aceakash / index.js
Created October 19, 2021 14:43
Extract payments by IBAN from UFX
/*
xq is from here: https://github.com/kislyuk/yq
xq '.' ./input-ufx.xml > input-ufx.json && node index.js
*/
const fs = require('fs')
const ufxJsonFileName = "input-ufx.json"
const ufxJson = fs.readFileSync(ufxJsonFileName).toString()
@aceakash
aceakash / multireader_test.go
Created July 29, 2021 15:28
Playing with io - multireader
package main
import (
"github.com/matryer/is"
"io"
"io/ioutil"
"strings"
"testing"
)
@aceakash
aceakash / keybase.md
Created May 14, 2020 07:12
keybase.md

Keybase proof

I hereby claim:

  • I am aceakash on github.
  • I am akashkurdekar (https://keybase.io/akashkurdekar) on keybase.
  • I have a public key ASBLsXBW33wBA9_9GdGVtJk55Tw3UJ7AIX8eqcKqCFms1Qo

To claim this, I am signing this object:

@aceakash
aceakash / echo-hosts.js
Created June 6, 2019 11:01
echo hosts files
const fs = require('fs')
console.log('========= About to read /etc/hosts')
const buf = fs.readFile('/etc/hosts', (err, buf) => {
if (err) {
console.error('Error reading hosts file', err)
return
}
console.log('========= HOSTS FILE (start)')
console.log(buf.toString('utf-8'))
@aceakash
aceakash / README.md
Last active November 21, 2018 13:31
React quick start
npm i live-server -g
live-server
@aceakash
aceakash / main.md
Last active April 13, 2018 12:37
SQLite3 Cheat Sheet

Open SQLite3 shell with headers and column mode on:

sqlite3 -column -header your_db.db

Meta Commands

Meta Command Description
@aceakash
aceakash / Main.elm
Created December 10, 2017 19:21
Elm beginner program
module Main exposing (..)
import Html
main : Program Never Model Msg
main =
Html.beginnerProgram { model = initialModel, view = view, update = update }
@aceakash
aceakash / convert.py
Created September 17, 2017 17:13
Convert audio in MKV files to AC3. Required Python 3.6
import os
import subprocess
all_dir_contents = os.listdir()
mkv_files = [file for file in all_dir_contents if file.endswith('.mkv') and not file.endswith('.converted.mkv') ]
for mkv in mkv_files:
print('========== Starting ' + mkv + ' ===========')
out_file_name = mkv[:-4] + '.converted.mkv'