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
var app = angular.module('dragDrop', []); | |
app.directive('draggable', function() { | |
return function(scope, element) { | |
// this gives us the native JS object | |
var el = element[0]; | |
el.draggable = true; | |
el.addEventListener( |
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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
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
var gulp = require('gulp'); | |
var exec = require('child_process').exec; | |
gulp.task('default', function (cb) { | |
exec('sketchtool export slices assets/icons.sketch --output=assets/icons/', function (err, stdout, stderr) { | |
console.log(stdout); | |
console.log(stderr); | |
cb(err); | |
}); | |
}); |
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
# Maintainer: Christian Rebischke <echo Q2hyaXMuUmViaXNjaGtlQGdtYWlsLmNvbQo= | base64 -d> | |
_pkgname='N1' | |
pkgname='n1-git' | |
pkgver=..0edbf51 | |
pkgrel=1 | |
pkgdesc="An extensible mail client built on the modern web" | |
arch=('any') | |
url="https://github.com/mbilker/N1/tree/node-v4" | |
license=('') | |
depends=('nodejs' 'npm') |
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
// % swift qrcli.swift TEST > qrcode.png | |
// or, % swift build -Xswiftc -framework -Xswiftc CoreImage | |
import CoreImage | |
import class AppKit.NSBitmapImageRep | |
func qrcode(_ text: String) -> CIImage { | |
let filter = CIFilter(name: "CIQRCodeGenerator")! | |
filter.setValue(text.data(using: .shiftJIS), forKey: "inputMessage") | |
filter.setValue("M", forKey: "inputCorrectionLevel") |
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
var http = require("http") | |
, util = require("sys") // 0.3.x: require("util") | |
, fs = require("fs") | |
, client = http.createClient(80, "example.com") | |
, request = client.request("POST", "/", {"host":"example.com"}) | |
// send body chunks | |
request.write("hello, world") | |
// pump a file through |
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
// temp fix for iOS8 beta 1 (fixed in beta 2), add it after the reference to cordova.js | |
if (navigator.userAgent === undefined) { | |
navigator.__defineGetter__('userAgent', function() { | |
return("Mozilla/5.0 (iPhone; CPU iPhone OS 8_0 like Mac OS X) AppleWebKit"); | |
}); | |
} |
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 | |
KERNEL="vmlinuz-4.4.0-112-generic" | |
INITRD="initrd.img-4.4.0-112-generic" | |
CMDLINE="earlyprintk=serial console=ttyS0 acpi=off root=/dev/vda1 ro" | |
MEM="-m 1G" | |
SMP="-c 2" | |
NET="-s 2:0,virtio-net" | |
IMG_HDD="-s 4,virtio-blk,hd.raw" |
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
package com.comphenix.example; | |
import java.lang.reflect.Field; | |
import java.lang.reflect.Method; | |
import java.util.List; | |
import net.minecraft.server.v1_5_R3.Entity; | |
import net.minecraft.server.v1_5_R3.EntityHuman; | |
import net.minecraft.server.v1_5_R3.EnumSkyBlock; | |
import net.minecraft.server.v1_5_R3.IWorldAccess; |
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 AppDelegate: NSResponder, NSTouchBarDelegate, NSApplicationDelegate { | |
@available(OSX 10.12.2, *) | |
lazy var touchbar: NSTouchBar = { | |
let tb = NSTouchBar() | |
tb.delegate = self | |
tb.defaultItemIdentifiers = [NSTouchBarItemIdentifier(rawValue: "test")] | |
return tb | |
}() |
OlderNewer