Skip to content

Instantly share code, notes, and snippets.

View nocko's full-sized avatar

Shawn Nock nocko

View GitHub Profile
@nocko
nocko / SaltChannelCertAuth-Poseidon.vp
Created December 31, 2019 01:44
Verifpal model of Salt Channel w/ Cert auth used in Poseidon BLE protocol
attacker[active]
principal FactoryAuth [
knows private w // "wearable key"
gw = G^w
]
principal FacilityAuth [
knows private f // "facility key"
gf = G^f
@nocko
nocko / ftdi-sio-add-gpio-support.patch
Created August 11, 2016 16:22
ftdi-sio GPIO support for Linux >= 4.6
--- a/drivers/usb/serial/ftdi_sio.c.orig 2016-07-24 15:23:50.000000000 -0400
+++ b/drivers/usb/serial/ftdi_sio.c 2016-08-11 11:50:58.689444925 -0400
@@ -33,6 +33,9 @@
#include <linux/kernel.h>
#include <linux/errno.h>
+#ifdef CONFIG_GPIOLIB
+#include <linux/gpio.h>
+#endif
#include <linux/slab.h>
--- gcc-4.9-gpl-2016-src/gcc/config/arm/t-arm-elf 2016-04-25 10:34:19.000000000 -0400
+++ gcc-4.9-gpl-2016-src/gcc/config/arm/t-arm-elf.new 2016-07-04 16:27:29.056019131 -0400
@@ -21,6 +21,15 @@
MULTILIB_EXCEPTIONS =
MULTILIB_MATCHES =
+MULTILIB_OPTIONS += mcpu=cortex-m0
+MULTILIB_DIRNAMES += armv6-m
+MULTILIB_EXCEPTIONS += marm/mcpu=cortex-m0
+MULTILIB_EXCEPTIONS += mcpu=cortex-m0
@nocko
nocko / cipher2.adb
Last active July 1, 2016 18:03
Ada substitution cipher, take 2
with Ada.Command_Line; use Ada.Command_Line;
with Ada.Sequential_IO;
with Ada.Strings.Maps; use Ada.Strings.Maps;
with Ada.Text_IO;
procedure Cipher is
package Char_IO is new Ada.Sequential_IO (Character);
use Char_IO;
Alphabet: constant String := "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
Key : constant String := "VsciBjedgrzyHalvXZKtUPumGfIwJxqOCFRApnDhQWobLkESYMTN";
@nocko
nocko / hello.adb
Last active June 30, 2016 17:56
Ada Vowel/Consonant Counting
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
procedure Hello is
Letter : Character;
Input : Unbounded_String;
Vowels : constant String := "aAeEiIoOuUyY";
Match : Boolean := False;
Vowels_Count : Natural := 0;
@nocko
nocko / nrf51.xml
Created June 30, 2016 13:03
ADA.STRINGS.INDEX_ERROR
<?xml version="1.0" encoding="utf-8"?>
<!-- File naming: <vendor>_<part/series name>_svd.xml -->
<device schemaVersion="1.1" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="CMSIS-SVD_Schema_1_0.xsd" >
<vendor>Nordic Semiconductor</vendor> <!-- Name for Doxygroup -->
<vendorID>Nordic</vendorID> <!-- Vendor ID -->
<name>nrf51</name> <!-- Official name of part or part series -->
<series>nrf51</series>
<version>522</version> <!-- Version of this description. It is the run of the automatic generation of SUS. -->

Keybase proof

I hereby claim:

  • I am nocko on github.
  • I am nocko (https://keybase.io/nocko) on keybase.
  • I have a public key whose fingerprint is D205 AB9F 81B7 B1C7 E493 ADE8 6FDA 11EE 3BC4 12E3

To claim this, I am signing this object:

@nocko
nocko / 0003-binutils-texinfo-5.0.patch
Last active December 27, 2015 21:18
PKGBUILD and patch for for binutils-msp430 . binutils 2.23.2 supports msp430 as a target without the msp430-gcc patchset . An updated 0003 patch is needed as well.
From b6c5b847cf983ccddff460f997f8338f2022bd78 Mon Sep 17 00:00:00 2001
From: Shawn Nock <nock@nocko.se>
Date: Sat, 9 Nov 2013 11:52:51 -0500
Subject: [PATCH] binutils-texinfo-5.0
---
bfd/doc/bfd.texinfo | 4 ++--
binutils/doc/binutils.texi | 12 ++++++------
ld/ld.texinfo | 4 ++--
3 files changed, 10 insertions(+), 10 deletions(-)
@nocko
nocko / mirror-fuse.vol
Created February 21, 2013 16:44
volume file for cfmi mirror (glusterfs)
volume mirror-client-0
type protocol/client
option remote-host lauterbur
option remote-subvolume /raid/mirror
option transport-type tcp
end-volume
volume mirror-client-1
type protocol/client
option remote-host mansfield
@nocko
nocko / gist:5006065
Created February 21, 2013 16:41
"Invalid argument" resolving linked (DHT) files in glusterfs 3.3
ogawa @ raid-mirror2.log:
[2013-02-21 10:19:42.039810] I [server3_1-fops.c:576:server_mknod_cbk] 0-mirror-server: 1335133: MKNOD /cfmi/raw/dicom/data/cfmi/MR/2011/01/17/1.3.12.2.1107.5.2.32.35052.30000011010515562426500000043.STU/1.3.12.2.1107.5.2.32.35052.2011011710511297090369232.0.0.0.SER/153.ACQ/1.3.12.2.1107.5.2.32.35052.2011011711025969557302899.IMA (00000000-0000-0000-0000-000000000000) ==> -1 (Permission denied)
ogawa @ raid-mirror2-xattrs:
[root@ogawa 153.ACQ]# getfattr -dRm - .
# file: .
security.selinux="system_u:object_r:file_t:s0"
trusted.afr.mirror-client-4=0sAAAAAAAAAAAAAAAA
trusted.afr.mirror-client-5=0sAAAAAAAAAAAAAAAA
trusted.gfid=0su1BxnT+cQjuS7yANTSJbvw==