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
#!/usr/bin/python | |
# Modified by Travis Lee | |
# -changed output to display text only instead of hexdump and made it easier to read | |
# -added option to specify number of times to connect to server (to get more data) | |
# -added option to specify TLS version | |
# -added option to send STARTTLS command for use with SMTP/POP/IMAP/FTP/etc... | |
# -added option to specify an input file of multiple hosts, line delimited, with or without a port specified (host:port) | |
# -added option to have verbose output | |
# -added capability to automatically check if STARTTLS/STLS/AUTH TLS is supported when smtp/pop/imap/ftp ports are entered and automatically send appropriate command |
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
<?php | |
if (PHP_SAPI == 'cli') { | |
// If the index.php is called using console, we would try to host | |
// the built in PHP Server | |
if (version_compare(phpversion(), '5.4.0', '>=') === true) { | |
//exec('php -S -t ' . __DIR__ . '/'); | |
$cmd = "php -S localhost:5000 -t " . __DIR__; | |
$descriptors = array( | |
0 => array("pipe", "r"), |
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
# apt-get install php5-dev make gcc | |
composer --dev require facebook/xhprof dev-master | |
pushd vendor/facebook/xhprof/extension | |
phpize | |
./configure | |
make | |
make install | |
popd | |
echo extension=xhprof.so > /etc/php5/mods-available/xhprof.ini | |
php5enmod xhprof |
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
// modified version to read DS18B20 in bit banging | |
// | |
// 24 May 2014 | |
// Daniel Perron | |
// | |
// Use At your own risk | |
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
#ifndef __CGRECT_MACROS__ | |
#define __CGRECT_MACROS__ | |
#define CGRectX(rect) rect.origin.x | |
#define CGRectY(rect) rect.origin.y | |
#define CGRectWidth(rect) rect.size.width | |
#define CGRectHeight(rect) rect.size.height | |
#define CGRectSetSize(rect, w, h) CGRectMake(CGRectX(rect), CGRectY(rect), w, h) | |
#define CGRectSetOrigin(rect, x, y) CGRectMake(x, y, CGRectWidth(rect), CGRectHeight(rect)) | |
#define CGRectSetWidth(rect, w) CGRectSetSize(rect, w, CGRectHeight(rect)) |
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
# RFX protocols | |
# ------------------------------------------------------------------- | |
# # Protocol State | |
# ------------------------------------------------------------------- | |
# 0 Undecoded Disabled | |
# 1 RFU Disabled | |
# 2 Byrox SX Disabled | |
# 3 RSL Disabled | |
# 4 Lightning4 Enabled | |
# 5 FineOffset/Viking Disabled |
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
<?php | |
/** | |
* Generate a random number without uses of deterministic rand / mt_rand php function | |
* based on https://codeascraft.com/2012/07/19/better-random-numbers-in-php-using-devurandom | |
* - Add 64 bit support | |
* - Removed mcrypt dependency (PHP7 required) | |
*/ | |
function devurandom_rand($min = 0, $max = PHP_INT_MAX) { |
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
<?php | |
/** | |
* Context objects aims to be used as a small bucket of mixed data. | |
* This class provide methods to define and retrieve these data | |
* identified by a Key. | |
*/ | |
class Context { | |
/* @var array internal storage of Context variables */ |
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
// | |
// ViewController.m | |
// tile | |
// | |
// Created by Michael Hurni on 20/10/2018. | |
// Copyright © 2018 Michael Hurni. All rights reserved. | |
// | |
#import "ViewController.h" |
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
// | |
// BindableStore.swift | |
// SwiftUIExperiment | |
// | |
// Created by Michael Hurni on 06/06/2019. | |
// Copyright © 2019 SwitchKit. All rights reserved. | |
// | |
import Combine | |
import SwiftUI |
OlderNewer