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
@Teino1978-Corp
Teino1978-Corp / MacrosInProgrammingLanguages.md
Created October 30, 2015 23:04 — forked from TheSeamau5/MacrosInProgrammingLanguages.md
Macros in Different Programming Languages

Macros/Metaprogramming in Programming Languages

The following is a list of programming languages and their syntax for doing metaprogramming.

C

Macros in C are just glorified string substitution.

@Teino1978-Corp
Teino1978-Corp / conditional-logic-example.php
Created October 30, 2015 23:42 — forked from tanftw/conditional-logic-example.php
Conditional Logic Basic Syntax
<?php
add_filter( 'rwmb_meta_boxes', function( $meta_boxes )
{
$meta_boxes[] = array(
'id' => 'brand_product',
'title' => 'Brands and Products',
'post_types' => array( 'post', 'page' ),
'context' => 'normal',
'priority' => 'high',
// Conditional Logic can be applied to Meta Box
@Teino1978-Corp
Teino1978-Corp / good_arrow.clj
Created October 30, 2015 23:48 — forked from gfredericks/good_arrow.clj
Replacing my bad logic with arrow syntax
; Had this
(let [g (nf.graph6/graph6-to-set (:graph6 rec)),
unfairness (nf.graphs/unfairness g)]
...)
; and replaced with this
(let [unfairness (-> rec
:graph6
@Teino1978-Corp
Teino1978-Corp / subfloat-row.tex
Created October 31, 2015 02:03 — forked from ashwin/subfloat-row.tex
Sub-figures arranged in rows in LaTeX
\begin{figure}
\centering
\subfloat[]
{
\includegraphics[scale=.6]{fig-1.pdf}
\label{fig:foo-1}
}
\par
\subfloat[]
{
@Teino1978-Corp
Teino1978-Corp / yannisPackages.tex
Created October 31, 2015 02:10 — forked from mitliagkas/yannisPackages.tex
Commonly included latex packages
% Typesetting
%\usepackage[margin=1in]{geometry}
%\usepackage{fullpage}
\usepackage{verbatim}
% Fonts and stuff
%\usepackage{times}
%\usepackage{soul}
\usepackage{color}
%\usepackage[usenames,dvipsnames]{color}
@Teino1978-Corp
Teino1978-Corp / list_as_default_func_arg.py
Created October 31, 2015 02:26 — forked from lig/list_as_default_func_arg.py
"def foo(bar=[])" explained
lst = []
def foo1(bar=lst):
bar.append(1)
print(bar)
foo1()
foo1()
foo1()
@Teino1978-Corp
Teino1978-Corp / gist:1d5d8d1ff6692e1d45f6
Created October 31, 2015 03:03 — forked from alecperkins/gist:2322939
+postclear Compass mixin
// Adds a pseudo element :after that clears floats, preventing them from riding
// up into the element, while still allowing the element to wrap around floats
// before it. This is useful for ensuring floating elements remain in place,
// vertically, when the non-floating elements are too short to push them down.
=postclear($side: both)
&:after
content: " "
display: block
clear: $side
@Teino1978-Corp
Teino1978-Corp / lineread_mmap.ipynb
Created October 31, 2015 03:16 — forked from catawbasam/lineread_mmap.ipynb
Faster, memory-efficient line-oriented text processing in Julia using mmap array
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Teino1978-Corp
Teino1978-Corp / rui_test.h
Created October 31, 2015 03:23 — forked from justinbowes/rui_test.h
RUI test harness. C99, MSVC/GCC/Clang, standalone tests.
//
// rui_test.h
// Quanta
//
// Created by Justin Bowes on 2014-11-06.
// Copyright (c) 2014 Informi Software Inc. All rights reserved.
//
#ifndef rui_test__B2BD1D7_F65A_4026_B67F_437E3C640A18_h
#define rui_test__B2BD1D7_F65A_4026_B67F_437E3C640A18_h
@Teino1978-Corp
Teino1978-Corp / streamtop.rb
Created October 31, 2015 05:54 — forked from kmullin/streamtop.rb
streamtop.rb a quick (poorly written) ruby hi_scores list for checking http log files to quickly find trends
#!/usr/bin/env ruby
require 'optparse'
$ctable = Hash.new(0) # table of string => count
def clearTerm
print "\e[2J\e[f"
end