📂 Minimize allocations in Go
A collection of tips for when you need to minimize the number of allocations in your Go programs.
Use the go profiler to identify which parts of your program are responsible for most allocations.
A collection of tips for when you need to minimize the number of allocations in your Go programs.
Use the go profiler to identify which parts of your program are responsible for most allocations.
I did PCI passthrough on Archlinux and Debian with the old PCI-stub method (this was pre-4.0 era). And later I did PCI passthrough on the 4.1+ kernels on Arch and Ubuntu (16.10 I think?).
This is my attempt at doing the same on Nixos.
Rich Hickey • 3 years ago
Sorry, I have to disagree with the entire premise here.
A wide variety of experiences might lead to well-roundedness, but not to greatness, nor even goodness. By constantly switching from one thing to another you are always reaching above your comfort zone, yes, but doing so by resetting your skill and knowledge level to zero.
Mastery comes from a combination of at least several of the following:
When using ArchLinux, I typically prefer to use an AUR helper like pacaur or yaourt to automate away the process of installing a community package.
Ansible's pacman module is
great, but it doesn't support AUR packages or pacman's -U
flag.
Installing AUR packages with Ansible seemed to be left as an exercise to
the user, and since AUR helpers do not come with a fresh Arch install, I
package main | |
// | |
// Starting point is from http://gcmurphy.wordpress.com/2012/11/30/using-epoll-in-go/ | |
// | |
import ( | |
"fmt" | |
"os" | |
"syscall" |
// | |
// React addon for easier React.DOM building without JSX | |
// | |
// Usage: | |
// | |
// render: function () { | |
// return React.addons.tagHelper( | |
// ['#main.container', | |
// ['h1', 'Hello!'], | |
// ['a.andClass.andAnother', { href: '/' }, 'Home']] |
# Description: | |
# Post gitlab related events using gitlab hooks and hipchat API | |
# | |
# Dependencies: | |
# "url" : "" | |
# "querystring" : "" | |
# | |
# Configuration: | |
# HIPCHAT_TOKEN | |
# GITLAB_ROOT |
Others have recently developed packages for this same functionality, and done it better than anything I could do. Use the packages instead of this script:
Gargoyle package by @lantis1008
OpenWRT package by @dibdot
In its basic usage, this script will modify the router such that blocked addresses are null routed and unreachable. Since the address blocklist is full of advertising, malware, and tracking servers, this setup is generally a good thing. In addition, the router will update the blocklist weekly. However, the blocking is leaky, so do not expect everything to be blocked.
var empty_list = function(selector) { | |
return selector(undefined, undefined, true); | |
}; | |
var prepend = function(el, list) { | |
return function(selector) { | |
return selector(el, list, false); | |
}; | |
}; | |
var head = function(list) { |