| #!/usr/bin/env python | |
| import time | |
| import sys | |
| import getpass | |
| from rgbmatrix import RGBMatrix, RGBMatrixOptions | |
| import cv2 as cv | |
| options = RGBMatrixOptions() | |
| options.hardware_mapping = 'regular' |
tldr: go build only produces an executable for main packages. Check the package name of your main file is main.
I am an idiot. Its only through mistakes that you learn tho. I have recently been running into issues with my new golang projects. ONLY the new ones. Whenever I try to make a new project, it would always have issues. The biggest issue is the fact that "go build" would not produce an executable without "-o main.exe" as arguments. When an executable was produced, if I ran it I got
$ ./main.exe
./main.exe: line 1: syntax error near unexpected token \`newline\'
./main.exe: line 1: \`!<arch>\'
| /** | |
| * Settings | |
| */ | |
| var settings = { | |
| scripts: true, // Turn on/off script tasks | |
| polyfills: true, // Turn on/off polyfill tasks | |
| styles: false, // Turn on/off style tasks | |
| svgs: false, // Turn on/off SVG tasks | |
| static: false, // Turn on/off static file copying |
| -Xmx10g | |
| m2.xlarge (4 virtual cores) | |
| Both Jetty and Netty execute the same code--generate 8k of random bits and compute a sha1, returning it over the wire. | |
| INTERNAL (Benchmark tool runs on same machine) | |
| -------- | |
| Jetty: |
| // Include gulp | |
| var gulp = require('gulp'); | |
| // Include Our Plugins | |
| var sass = require('gulp-sass'); | |
| var concat = require('gulp-concat'); | |
| var uglify = require('gulp-uglify'); | |
| var rename = require('gulp-rename'); | |
| var autoprefixer = require('gulp-autoprefixer'); | |
| var minifycss = require('gulp-minify-css'); |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
| #!/usr/bin/env python | |
| """ | |
| Use byzanz to create a GIF screencast of a specific window. | |
| Required tools: | |
| sudo apt-get install byzanz x11-utils xdotool | |
| A tip: use an extra-long duration (-d 100), record your shot, and use | |
| gimp to shorten the duration of the last frame. You need to rename the layer | |
| from "Frame 123 (100000 ms) (combine)" to "Frame 123 (1000 ms) (combine)". |
| package typedactorrefs | |
| import akka.actor._ | |
| import akka.pattern.AskSupport | |
| import akka.util.Timeout | |
| import scala.concurrent.Future | |
| import typedactorrefs.Server.ServerMessage | |
| import scala.concurrent.duration._ | |
| import typedactorrefs.Server.GetModule | |
| import typedactorrefs.Server.Module |
First, you have to enable profiling
> db.setProfilingLevel(1)
Now let it run for a while. It collects the slow queries ( > 100ms) into a capped collections, so queries go in and if it's full, old queries go out, so don't be surprised that it's a moving target...