Skip to content

Instantly share code, notes, and snippets.

View Teino1978-Corp's full-sized avatar

Teino Boswell Teino1978-Corp

  • Ocho Rios, Jamaica
View GitHub Profile
<?php if( get_field('radio_field' ) === "yes") { ?>
<div>
<!-- Stuff -->
</div>
<?php } ?>
@Teino1978-Corp
Teino1978-Corp / test_radio_module_communication.rb
Created January 9, 2016 06:17
Test Radio Module Communication
def test_radio_module_communication
total_reads = 20
overall_result = "SUCCESS"
# get the current study table first so it can be reset after test
original_serial_numbers = get_serial_numbers_from_study_table
# ---------------------------------------------------------------
# clear out the current study table
send_set_study_table_command([])
/**!
* Source: http://hazelware.luggle.com/tutorials/mulawcompression.html.
*/
var MuLaw = (function(){
var cBias = 0x84,
cClip = 32635,
exponents = [ 0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3
, 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4
, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5
, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary">
<input type="radio" name="options" id="option1"> Option 1
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="option2"> Option 2
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="option3"> Option 3
</label>
<param name="cssStyle" type="radio" default="style1" label="Style">
<option value="style1">Style 1</option>
<option value="style2">Style 2</option>
<option value="style3">Style 3</option>
</param>
searchController.searchBar.forEachSubviewOfClass(UITextField.self) { textField in
let textField = textField as! UITextField
textField.textColor = .whiteColor()
}
@Teino1978-Corp
Teino1978-Corp / set-ovpn-firewall.sh
Created January 2, 2016 04:10
Basic, hardened iptables + ip6tables firewall script for an OpenVPN 2.3.x server running dnscrypt-proxy and unbound for DNS. Designed with security testing in mind. Supports dual-stack IPv4 + IPv6. Hardens against many common attacks, and implements strict filtering of DHCP, ICMPv6, and DHCPv6. Tested on Arch Linux; most Linux should work, also. (
#!/bin/bash
echo ' (pre) script declarations'
IP6TABLES='/sbin/ip6tables'
IP4TABLES='/sbin/iptables'
LAN_IF='ens+'
TUN_IF='tun+'
INNER_GLOBAL_UNICAST='2001:0db8:ffff:ffff::/48'
INNER_IPV4_UNICAST='10.8.0.0/24'
IPV4_LINK_LOCAL='169.254.0.0/16' #RFC 3927
IPV6_LINK_LOCAL='fe80::/10' #RFC 4291
@Teino1978-Corp
Teino1978-Corp / cheatsheet.tex
Created December 17, 2015 01:11
latex cheat sheet
% source: http://tex.stackexchange.com/questions/8827/preparing-cheat-sheets
\documentclass[10pt,landscape]{article}
\usepackage{multicol}
\usepackage{calc}
\usepackage{ifthen}
\usepackage[landscape]{geometry}
\usepackage{amsmath,amsthm,amsfonts,amssymb}
\usepackage{color,graphicx,overpic}
\usepackage{hyperref}
@Teino1978-Corp
Teino1978-Corp / README.md
Created December 17, 2015 00:39
Jekyll Scholar - bibliographies & citations.

Jekyll-Scholar

Jekyll-Scholar is for all the academic bloggers out there. It is a set of extensions to Jekyll, the awesome, blog aware, static site generator; it formats your bibliographies and reading lists for the web and gives your blog posts citation super-powers.

For additional features you may also want to take a look at jekyll-scholar-extras.

@Teino1978-Corp
Teino1978-Corp / main.tex
Created December 17, 2015 00:22
Bibtex example
\documentclass[a4paper]{article}
\usepackage[style=authortitle -icomp ,natbib=true ,sortcites=true ,block=space]{biblatex}
\bibliography{references}
\begin{document}
% Some text with a footnote citation:
Lorem\footcite{bible} ipsum dolor sit amet , consectetur
adipiscing elit. Quisque est elit , varius sed adipiscing
quis , consequat sed nibh.\footcite{bible}