Skip to content

Instantly share code, notes, and snippets.

Index: _arch-n-opsys
===================================================================
--- _arch-n-opsys (revision 3868)
+++ _arch-n-opsys (working copy)
@@ -104,8 +104,9 @@
OpenBSD)
OPSYS=openbsd
HEAP_OPSYS=bsd
- case `uname -m` in
+ case `uname -p` in
Index: runtime/include/asm-base.h
===================================================================
--- runtime/include/asm-base.h (revision 3868)
+++ runtime/include/asm-base.h (working copy)
@@ -126,6 +126,17 @@
# define DOUBLE(V) .double V
# define LABEL(ID) ID:
# define __SC__ @
+
+# elif (defined(OPSYS_OPENBSD) && defined(TARGET_PPC))
@jasperla
jasperla / prism-puppet.js
Created May 21, 2014 15:10
prism.js puppet mode
Prism.languages.puppet = Prism.languages.extend('clike', {
'keyword': /\b(and|case|class|default|define|else|elsif|false|if|in|import|inherits|node|or|true|undef|unless)\b/g,
'constant': /\b(false|true|running|stopped|mounted|latest|present|absent|file|directory)\b/g,
'comment': /#[^\r\n]*(\r?\n|$)/g,
});
Prism.languages.insertBefore('puppet', 'keyword', {
'atrule': /[\$]+([a-z][a-z0-9_]*)?(::[a-z][a-z0-9_]*)*\b/g,
'class': /\b([a-z][a-z0-9_]*)?(::[a-z][a-z0-9_]*)+\b/g
});
----------------------------------------------------------------------------------
-- Engineer: J. Lievisse Adriaanse <jasper@humppa.nl>
--
-- Create Date: 12:03:42 05/25/2014
-- Design Name:
-- Module Name: sevenseg - Behavioral
-- Project Name:
-- Target Devices:
-- Tool versions:
-- Description:
@jasperla
jasperla / gist:288c643e16fc3b59b64c
Last active August 29, 2015 14:03
py-git2 build log
+++ Thu Jul 3 10:38:57 CEST 2014
===> Checking files for py-git2-0.21.0
`/usr/ports/distfiles/libgit/pygit2-0.21.0.tar.gz' is up to date.
>> (SHA256) libgit/pygit2-0.21.0.tar.gz: OK
===> Extracting for py-git2-0.21.0
===> Patching for py-git2-0.21.0
===> Configuring for py-git2-0.21.0
perl /usr/ports/infrastructure/bin/pkg_subst -DMODPY_PYCACHE= -DMODPY_COMMENT=\"@comment\ \" -DMODPY_PYC_MAGIC_TAG= -DMODPY_BIN=/usr/local/bin/python2.7 -DMODPY_EGG_VERSION= -DMODPY_VERSION=2.7 -DMODPY_BIN_SUFFIX= -DMODPY_PY_PREFIX=py- -DMACHINE_ARCH=amd64 -DARCH=amd64 -DHOMEPAGE=http://libgit2.github.com/ -D^PREFIX=/usr/local -D^SYSCONFDIR=/etc -DFLAVOR_EXT= -DFULLPKGNAME=py-git2-0.21.0 -DMAINTAINER=The\ OpenBSD\ ports\ mailing-list\ \<ports@openbsd.org\> -D^BASE_PKGPATH=devel/libgit2/py-git2 -D^LOCALBASE=/usr/local -D^X11BASE=/usr/X11R6 -D^TRUEPREFIX=/usr/local -D^RCDIR=/etc/rc.d -D^LOCALSTATEDIR=/var /usr/obj/ports/py-git2-0.21.0/pygit2-0.21.0/pygit2/ffi.py
===> Building for py-git2-0.21.0
pygit2/__pycache__/_cffi__x8bb
irb(main):008:0> speaker.queue
=> {:total=>0, :items=>[]}
irb(main):009:0> speaker.add_spotify_to_queue({:id => '3FIC2jEXBHTSEb0ZdoLvpJ', :type => 'album'})
=> 1
irb(main):010:0> speaker.add_spotify_to_queue({:id => '2CwulIyrmEYwbUWzcEVIhR'})
=> 11
irb(main):011:0> speaker.add_spotify_to_queue({:type => 'starred'})
=> 12
irb(main):012:0> speaker.queue
=> {:total=>12, :items=>[{:queue_id=>"Q:0/1", :title=>"Kill The Noise (Part I)", :artist=>"Kill The Noise", :album=>"Kill Kill Kill", :album_art=>"http://192.168.178.113:1400/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a1dq8HSHtmc3y4kLGqywRS9%3fsid%3d9%26flags%3d32", :duration=>"0:07:50", :id=>"x-sonos-spotify:spotify%3atrack%3a1dq8HSHtmc3y4kLGqywRS9?sid=9&flags=32"}, {:queue_id=>"Q:0/2", :title=>"Deal With It", :artist=>"Kill The Noise", :album=>"Kill Kill Kill", :album_art=>"http://192.168.178.113:1400/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a0FBmjDE2mZ25mq494fdS4j%3fsid%3d9%26flags%3d32", :duration=>"0:03:37", :id=>"x-sonos-spotify:spotify%3
@jasperla
jasperla / .Xdefaults
Last active August 29, 2015 14:03
.Xdefaults
!{{{ XFT
Xft.dpi: 72
Xft.antialias: 1
Xft.hinting: 1
Xft.hintstyle: hintfull
Xft.rgba: rgb
!}}}
!{{{ URXVT
urxvt*loginShell: false
@jasperla
jasperla / routing_table.rb
Last active August 29, 2015 14:06
lib/specinfra/command/openbsd/base/routing_table.rb
# Match with:
# /^(\S+)\s+(\S+).*?(\S+[0-9]+)$/
# $1: destination
# $2: gateway
# $3: interface
# or:
# /^(?<destination>\S+)\s+(?<gateway>\S+).*?(?<interface>\S+[0-9]+)$/
class Specinfra::Command::Openbsd::Base::RoutingTable < Specinfra::Command::Base::RoutingTable
class << self
@jasperla
jasperla / dict.swift
Created October 19, 2014 14:37
dictionary fail
/*
* thread #1: tid = 0x2e1aec, 0x00000001167611ac $__lldb_expr29`Swift._NativeDictionaryStorage.fromArray <A : Swift.Hashable, B>(Swift._NativeDictionaryStorage<A, B>.Type)(Swift.Array<(A, B)>) -> Swift._NativeDictionaryStorage<A, B> + 2284, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
* frame #0: 0x00000001167611ac $__lldb_expr29`Swift._NativeDictionaryStorage.fromArray <A : Swift.Hashable, B>(Swift._NativeDictionaryStorage<A, B>.Type)(Swift.Array<(A, B)>) -> Swift._NativeDictionaryStorage<A, B> + 2284
frame #1: 0x000000011675de35 $__lldb_expr29`Swift.Dictionary.convertFromDictionaryLiteral <A : Swift.Hashable, B>(Swift.Dictionary<A, B>.Type)(Swift.Array<(A, B)>...) -> Swift.Dictionary<A, B> + 69
frame #2: 0x00000001167569b3 $__lldb_expr29`top_level_code + 2483 at playground29.swift:10
frame #3: 0x0000000116756cf1 $__lldb_expr29`main + 49 at <EXPR>:0
frame #4: 0x000000010a7ed510 MyPlayground`get_field_types__XCPAppDelegate + 160
@jasperla
jasperla / test_known_hosts.aug
Last active August 29, 2015 14:08
known_hosts lens with aliases
(*
Module: Test_Known_Hosts
Provides unit tests and examples for the <Known_Hosts> lens.
*)
module Test_Known_Hosts =
(* Test: Known_Hosts.lns
Simple get test *)
test Known_Hosts.lns get "# A comment