Skip to content

Instantly share code, notes, and snippets.

Jan JanX2

Block or report user

Report or block JanX2

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:317cd8c152732e69f91b96979d8e965b
javascript:(function()%7Bvar%20s=document.createElement('link');s.setAttribute('href','https://dyslexicfonts.com/plugin/easyread.css');s.setAttribute('rel','stylesheet');s.setAttribute('type','text/css');document.getElementsByTagName('head')%5B0%5D.appendChild(s);%7D)();
@JanX2
JanX2 / sds011.py
Created Feb 9, 2018 — forked from geoffwatts/sds011.py
Read an SDS011 Laser PM2.5 Sensor (Nova PM Sensor) with Python
View sds011.py
#!/usr/bin/python
# -*- coding: UTF-8 -*-
# Requires pyserial. Install via:
# pip install pyserial
from __future__ import print_function
from serial import Serial, EIGHTBITS, STOPBITS_ONE, PARITY_NONE
import time, struct
View rnnoise_vad_demo.c
/* Copyright (c) 2017 Mozilla */
/* Copyright (c) 2017 Jan Weiß */
/*
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
View webrtc-VAD-subset-creation.md
@JanX2
JanX2 / xcode-class-dump.sh
Last active Apr 10, 2016 — forked from fzwo/xcode-class-dump.sh
Create a complete class-dump of Xcode, ready for adding to an empty Xcode project for all your header-ogling needs.
View xcode-class-dump.sh
#!/bin/bash
# Creates a complete class-dump of Xcode and all its libs and internal plug-ins.
# Assumes you have Class-Dump in your path and Xcode at the location set via `xcode-select`.
xcodeClassDump=${1:-"$HOME/Documents/XcodeClassDump"}
xcodePath=`xcode-select -p`
sourceXcodeRootPath="$(dirname "$xcodePath")"
echo "Dumping from Xcode: $sourceXcodeRootPath"
@JanX2
JanX2 / boost.sh
Last active Mar 25, 2016 — forked from faithfracture/boost.sh
Boost build script for iOS (armv7, armv7s, arm64), iOS Simulator (i386, x86_64), and OSX (i386, x86_64)
View boost.sh
#===============================================================================
# Filename: boost.sh
# Author: Pete Goodliffe
# Copyright: (c) Copyright 2009 Pete Goodliffe
# Licence: Please feel free to use this, with attribution
# Modified version
#===============================================================================
#
# Builds a Boost framework for iOS, iOS Simulator, and OSX.
# Creates a set of universal libraries that can be used on an iOS and in the
View Type this in front process.applescript
set theString to "Test"
set theseCharacters to characters of theString
tell application "System Events"
delay 2 -- Time to switch, if running from editor. Can be removed, if running from menu.
tell front process
repeat with thisChar in theseCharacters
keystroke (thisChar as text)
delay 0.1
View SignAndPackageForMAS.sh
#!/bin/bash
#
# SignAndPackageForMAS.sh v1.0.1
#
# Codesign an app bundle and build a signed package ready for submission to the
# Mac App Store
#
# Copyright (c) 2014 Felix Schwarz (@felix_schwarz), IOSPIRIT GmbH (@iospirit)
#
View keybase.md

Keybase proof

I hereby claim:

  • I am janx2 on github.
  • I am janx2 (https://keybase.io/janx2) on keybase.
  • I have a public key whose fingerprint is 174E E709 4D71 8181 229B BF3C 843C DD8C C631 4433

To claim this, I am signing this object:

@JanX2
JanX2 / commonPrefixLength-1.swift
Created Jun 8, 2014
Comparison of two approaches: one not using, one using optionals.
View commonPrefixLength-1.swift
/**
* Determine the common prefix elements of two collections.
* @param collection1 First collection.
* @param collection2 Second collection.
* @return The number of elements common to the start of each collection.
*/
func commonPrefixLength<T: Swift.Collection, U: Swift.Collection where
T: Sequence, U: Sequence,
T.GeneratorType.Element: Equatable,
T.GeneratorType.Element == U.GeneratorType.Element>
You can’t perform that action at this time.