Skip to content

Instantly share code, notes, and snippets.

View larrybolt's full-sized avatar

Larry Boltovskoi larrybolt

  • Orsa
View GitHub Profile
@larrybolt
larrybolt / init.lua
Created October 14, 2019 19:36
hammerspoon
-----------------------------------------------
-- Set up
-----------------------------------------------
local hyper = {"shift", "cmd", "alt", "ctrl"}
-- dofile("anycomplete/anycomplete.lua")
dofile("/Users/larrybolt/.dotfiles/hammerspoon/anycomplete/anycomplete.lua")
-----------------------------------------------
{
"libs": [],
"loadEagerly": [],
"plugins": {
"webpack": {
"configPath": "./internals/webpack/webpack.dev.babel.js"
}
}
}
@larrybolt
larrybolt / spacemacs-cheatsheet.md
Last active May 2, 2019 09:05 — forked from robphoenix/spacemacs-cheshe.md
Spacemacs Cheat Sheet

Useful Spacemacs commands

  • SPC q q - quit
  • SPC w / - split window vertically
  • SPC w - - split window horizontally
  • SPC 1 - switch to window 1
  • SPC 2 - switch to window 2
  • SPC w d - delete current window
  • SPC TAB - switch to previous buffer
  • SPC b b - switch buffers

Building TensorFlow 1.3.0-rc1 for Raspberry Pi/Ubuntu 16.04: a Step-By-Step Guide

Here you'll learn how to build Tensorflow for the raspberry pi 3 with either the Python API or as a standalone shared library which can be interfaced from the C++ API and eventually as a library which can be used in other languages.

[...]

Now we can build Bazel! Warning: This takes a really, really long time. Several hours.

[...]

#!/usr/bin/env bash
set -o nounset
set -o errexit
trap 'echo "Aborting due to errexit on line $LINENO. Exit code: $?" >&2' ERR
set -o errtrace
set -o pipefail
function gif2mp4 {
# https://unix.stackexchange.com/a/294892
ffmpeg -hide_banner -loglevel panic -i "$1" -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" "$1.mp4"
@larrybolt
larrybolt / Dockerfile
Created December 18, 2018 23:16
gradle + spring boot + docker
FROM gradle:5.0-alpine AS build
ENV APP_HOME=/app
USER root
RUN mkdir -p $APP_HOME/
WORKDIR $APP_HOME
# download dependencies
COPY build.gradle settings.gradle ./
RUN gradle resolveDependencies
// this is our aync function
function query(x) {
return new Promise(resolve => {
setTimeout(() => {
resolve(x * 2)
}, 2000)
});
}
@larrybolt
larrybolt / telenet homespot error
Created March 14, 2018 10:53
telenet homespot error
Telenet homespot Wi-Free
wifiportal.telenet.be
Error executing macro: displayForm required parameter: roamingPartner is not specified. The problematic instruction: ---------- ==> macro displayForm [on line 106, column 1 in macro.ftl] in user-directive displayForm [on line 71, column 33 in login.ftl] ---------- Java backtrace for programmers: ---------- freemarker.template.TemplateException: Error executing macro: displayForm required parameter: roamingPartner is not specified. at freemarker.core.Macro$Context.sanityCheck(Macro.java:211) at freemarker.core.Macro$Context.runMacro(Macro.java:169) at freemarker.core.Environment.visit(Environment.java:614) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:106) at freemarker.core.Environment.visit(Environment.java:221) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:221) at freemarker.core.Environment.process(Environment.java:199) at freemarker.template.Template.process(Template.java:237) at o
@larrybolt
larrybolt / javascript-map-examples.js
Created February 16, 2018 17:31
javascript map and forEach examples with for and ECMA6
// we have an array, with items
const items = [
'ethan',
'larry',
'katrijn',
'janice'
];
// To go and print all of them
/* Regular, old way of doing it */ console.log("\n\n 1")
# https://stackoverflow.com/questions/2668678/importing-csv-with-line-breaks-in-excel-2007
gawk -v RS='"' 'NR % 2 == 0 { gsub(/\n/, "") } { printf("%s%s", $0, RT) }' input.csv > output.fixed.csv