Since 2008 or 2009 I work on Apple hardware and OS: back then I grew tired of Linux desktop (which is going to be MASSIVE NEXT YEAR, at least since 2001), and switched to something that Just Works. Six years later, it less and less Just Works, started turning into spyware and nagware, and doesn't need much less maintenance than Linux desktop — at least for my work, which is system administration and software development, probably it is better for the mythical End User person. Work needed to get software I need running is not less obscure than work I'd need to do on Linux or othe Unix-like system. I am finding myself turning away from GUI programs that I used to appreciate, and most of the time I use OSX to just run a terminal, Firefox, and Emacs. GUI that used to be nice and unintrusive, got annoying. Either I came full circle in the last 15 years of my computer usage, or the OSX experience degraded in last 5 years. Again, this is from a sysadmin/developer ki
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
myapp: | |
build: . | |
container_name: "myapp" | |
image: debian/latest | |
environment: | |
- NODE_ENV=development | |
- FOO=bar | |
volumes: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
[[ "$(git symbolic-ref --short HEAD)" == "master" ]] || exit 0 | |
msg() { | |
echo "[1;34m> [1;32m$@[0m" | |
} | |
dir="$(pwd)" | |
tmp="$(mktemp -d)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# extend non-HiDPI external display on DP* above HiDPI internal display eDP* | |
# see also https://wiki.archlinux.org/index.php/HiDPI | |
# you may run into https://bugs.freedesktop.org/show_bug.cgi?id=39949 | |
# https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/883319 | |
EXT=`xrandr --current | sed 's/^\(.*\) connected.*$/\1/p;d' | grep -v ^eDP | head -n 1` | |
INT=`xrandr --current | sed 's/^\(.*\) connected.*$/\1/p;d' | grep -v ^DP | head -n 1` | |
ext_w=`xrandr | sed 's/^'"${EXT}"' [^0-9]* \([0-9]\+\)x.*$/\1/p;d'` |
Scalaz | |||
Symbol | Code | Ascii | Example |
---|---|---|---|
η | 951 | pure | 1.η[List] |
μ | 03BC | join | List(List(1,2,3), nil, List(5,6,7)) μ |
∅ | 2205 | zero | ∅[Int] |
<∅> | empty | <∅>[Option, Int] |
|
∙ | 2219 | contramap | ((_:String).length ∙ (_:Int).toString ∙ ((_:Int) + 6))(5) |
∘ | 2218 | map | (((_:Int) + 6) ∘ (_:Int).toString ∘ (_:String).length)(5) |
∘∘ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Feed(val url: String) { | |
def downloadItems(): List[Item] = { | |
val root = XML.load(url) | |
(root \\ "item").map(buildItem(_)).toList | |
} | |
def buildItem(node: Node): Item = { | |
new Item(this, | |
(node \\ "title").text, | |
(node \\ "guid").text, | |
(node \\ "pubDate").text) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="fr.ippon.mobile.nfcdemo" | |
android:versionCode="1" | |
android:versionName="1.0" > | |
<uses-sdk | |
android:minSdkVersion="14" | |
android:targetSdkVersion="15" /> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Inherit prototype properties | |
* @param {Function} ctor | |
* @param {Function} superCtor | |
*/ | |
_.mixin({ | |
inherits: (function(){ | |
function noop(){} | |
function ecma3(ctor, superCtor) { |
NewerOlder