Skip to content

Instantly share code, notes, and snippets.

View andyscott's full-sized avatar
🌲

Andy Scott andyscott

🌲
View GitHub Profile
let
fontOverlay = import ./font-overlays.nix;
pkgsOverlay = import ./pkgs-overlay.nix;
user = "anhduy";
in
{ config, pkgs, ... }:
{
imports = [ <home-manager/nix-darwin> ];
# Modified from https://github.com/alyssais configuration.
#
# The following configuration heavily leverages modal keymaps to minimize the
# pollution of global keybindings. In addition, the modal keymaps facilitate
# the consistent use of the same keybindings across different modes. For
# example, this configuration uses 'h', 'l', 'j', and 'k' to represent west,
# east, south, and north when: changing focus, warping windows, resizing
# windows, swapping windows, and moving floating windows. Those four keys are
# mapped differently depending on the current mode to provide a consistent user
# experience.
load("@io_bazel_rules_scala//scala:scala.bzl", "scala_library", "scala_binary")
scala_library(
name = "sjsir",
srcs = ["Test.scala"],
deps = ["@scalajs//:library"],
data = ["@scalajs//:compiler"],
scalacopts = ["-Xplugin:external/scalajs/lib/scalajs-compiler_2.11.11-0.6.19.jar"],
#scalacopts = ["-Xplugin:$(location @scalajs//:compiler)"], ??? location doesn't seems to be working
)
@kwylez
kwylez / gist:05b735162ac588b980f7
Created July 29, 2014 02:01
Blur animation for Stasis' Cover Image View. This works for iOS8 only
//
// STSCoverImageViewController.m
// Stasis
//
// Created by Cory D. Wiles on 6/5/14.
// Copyright (c) 2014 Macspots. All rights reserved.
//
#import "STSCoverImageViewController.h"
#import "Profile.h"
@warmuuh
warmuuh / bcdsl.scala
Created September 26, 2012 12:55
scala asm dsl
package wrm
import org.objectweb.asm.MethodVisitor
import org.objectweb.asm.Label
import org.objectweb.asm.Opcodes
import org.objectweb.asm.FieldVisitor
import org.objectweb.asm.AnnotationVisitor
import org.objectweb.asm.ClassWriter
object invokeHelper1 {
def apply(method: String) {}
@robcd
robcd / 3nightclubs.scala
Created September 26, 2011 08:29 — forked from oxbowlakes/3nightclubs.scala
A Tale of 3 Nightclubs
/**
* Part Zero : 10:15 Saturday Night
*
* (In which we will see how to let the type system help you handle failure)...
*
* First let's define a domain. (All the following requires scala 2.9.x and scalaz 6.0) */
import scalaz._
import Scalaz._
object Sobriety extends Enumeration {
@karmi
karmi / .gitignore
Created November 27, 2010 16:26
`tail -f` in Node.js and WebSockets
.DS_Store
*.log
tmp/
@retronym
retronym / drop-to-repl-2.8.scala
Created January 30, 2010 17:12
Embedding REPL in 2.8 working around classpath propagation changes.
object IntepreterFix {
import scala.tools.nsc._
import Interpreter._
def break(args: DebugParam[_]*): Unit = {
val intLoop = new InterpreterLoop
intLoop.settings = {
val s = new Settings(Console.println)
// need to pass this explicitly to the settings for Scalac.
// See: http://old.nabble.com/-scala--recent-changes-in-2.8-nightly-classpath-management-td26233977.html