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
| <?php namespace App\Http\Controllers; | |
| use Illuminate\Http\Request; | |
| trait RestControllerTrait | |
| { | |
| public function index() | |
| { | |
| $m = self::MODEL; | |
| return $this->listResponse($m::all()); |
| console.log('Loading function'); | |
| const https = require('https'); | |
| const url = require('url'); | |
| // to get the slack hook url, go into slack admin and create a new "Incoming Webhook" integration | |
| const slack_url = 'https://hooks.slack.com/services/...'; | |
| const slack_req_opts = url.parse(slack_url); | |
| slack_req_opts.method = 'POST'; | |
| slack_req_opts.headers = {'Content-Type': 'application/json'}; |
| import japgolly.scalajs.react.vdom.all._ | |
| import japgolly.scalajs.react.{ReactElement, SyntheticEvent} | |
| import monifu.reactive.Observable | |
| import monifu.reactive.subjects.BehaviorSubject | |
| object StateExample { | |
| //--------------------------------- | |
| // (VIEW)-MODEL | |
| //--------------------------------- |
| import os | |
| import os.path | |
| import sys | |
| import subprocess | |
| class CommitInfo(object): | |
| def __init__(self): | |
| self.nodeid = None | |
| self.timestamp = None |
| """ | |
| YouCompleteMe extra configuration for Platformio based | |
| projects. | |
| Based on the `.ycm_extra_conf.py` by @ladislas in his Bare-Arduino-Project. | |
| Anthony Ford <github.com/ajford> | |
| """ | |
| import os |
Upgrading to Lion or Yosemite and WebStorm 9, I noticed key repeat was
turned off for the IdeaVim plugin h j k l keys.
defaults write -g ApplePressAndHoldEnabled -bool false in a terminal will enable
key repeat for every app. This can alternatively be found in the accessibility
settings in OS X' preferences.
Something small I have been working on to enhance basic types with type-safe wrappers to enforce invariants at compile time. Reading valid values from configuration was the initial driver for me to experiment with this.
I have just seen that @bvenners is working on something similar in Scalactic
- https://twitter.com/bvenners/status/529913792822394881
- https://github.com/scalatest/scalatest/tree/master/src/main/scala/org/scalactic/numbers
I really like his approach, here is a quick comparison with Scalactic's version
- it includes versions for Long, Float and Double; I just include Int
- it uses macros to ensure that basic construction only uses a valid Literal (this is an awesome idea!!!!)
| package example.statemachine | |
| import scalaz.{State, Scalaz}, Scalaz._ | |
| object FSM { | |
| def apply[I, S](f: PartialFunction[(I, S), S]): FSM[I, S] = | |
| new FSM((i, s) => f.applyOrElse((i, s), (_: (I, S)) => s)) | |
| private def states[S, O](xs: List[State[S, O]]): State[S, List[O]] = | |
| xs.sequence[({type λ[α]=State[S, α]})#λ, O] |
This is a guide on how to email securely.
There are many guides on how to install and use PGP to encrypt email. This is not one of them. This is a guide on secure communication using email with PGP encryption. If you are not familiar with PGP, please read another guide first. If you are comfortable using PGP to encrypt and decrypt emails, this guide will raise your security to the next level.