Skip to content

Instantly share code, notes, and snippets.

@theUncanny
theUncanny / Go Cheat Sheet.md
Created December 8, 2016 18:16 — forked from ikennaokpala/Go Cheat Sheet.md
Go Cheat Sheet

Go Cheat Sheet

Credits

Most example code taken from A Tour of Go, which is an excellent introduction to Go. If you're new to Go, do that tour. Seriously.

Go in a Nutshell

  • Imperative language
# Atom Cheatsheet.
# Project Key Bindings.
- 'cmd-shift-p': open the command palette.
- 'cmd-p' or 'cmd-t': open the fuzzy finder to find a file.
- 'cmd-b': look for a file that is already open.
- 'cmd-shift-b': search the list of files modified and untracked in your project repository.
- 'ctrl-0': open and focus the the tree view.
@theUncanny
theUncanny / golang-tls.md
Created January 4, 2017 20:07 — forked from denji/golang-tls.md
Simple Golang HTTPS/TLS Examples
Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
openssl ecparam -genkey -name secp384r1 -out server.key
@theUncanny
theUncanny / print_r.js
Created January 13, 2017 10:44 — forked from faisalman/print_r.js
PHP-like print_r() & var_dump() equivalent for JavaScript
/**
* PHP-like print_r() equivalent for JavaScript Object
*
* @author Faisalman <[email protected]>
* @license http://www.opensource.org/licenses/mit-license.php
* @link http://gist.github.com/879208
*/
var print_r = function (obj, t) {
// define tab spacing
@theUncanny
theUncanny / css_regression_testing.md
Created March 28, 2017 09:08 — forked from cvrebert/css_regression_testing.md
Survey of screenshot-based CSS testing tools

Currently considering https://github.com/webdriverio/webdrivercss


Core Goals:

  • Can test in up-to-date versions of all major browsers
  • Can test on up-to-date versions of all major OSes
  • Can test in IE9 (because Bootstrap v4 will support IE9+)
  • Don't want to have to setup/maintain our own cluster of VMs running all the necessary OSes (and all the versions of Windows)
  • Workflow for management of reference/baseline/norm screenshots
@theUncanny
theUncanny / Operaciones-Git
Created March 30, 2017 20:55 — forked from jelcaf/Operaciones-Git
Git Tips - Mini-trucos de Git para facilitarme la tarea
#############################################
# Push de la rama actual
git push origin $rama_actual
#############################################
# Volver a un commit anterior, descartando los cambios
git reset --HARD $SHA1
#############################################
# Ver y descargar Ramas remotas
<?php
class Csv
{
public static function fromArray($rows, $delimiter = ',')
{
if (empty($rows)) {
return '';
}
@theUncanny
theUncanny / Xml.php
Created April 4, 2017 21:49 — forked from barryvdh/Xml.php
XML Helper (from/to array)
<?php
use SimpleXMLElement;
class Xml {
/**
* @param array $data
* @param string $root
* @return SimpleXMLElement
@theUncanny
theUncanny / sample-linux.c
Created July 18, 2017 21:59 — forked from davidzchen/sample-linux.c
Sample C code using the Linux kernel coding style
/*
* Sample file using the Linux kernel coding convention.
*
* https://www.kernel.org/doc/Documentation/CodingStyle
*
* General rules:
* - Indents are tabs and must be 8 spaces wide.
* - Each line must be at most 80 characters long.
* - Use C-style comments.
* - File names should be lower-case.c
@theUncanny
theUncanny / akamai-curl.sh
Created October 18, 2017 14:54 — forked from jsleeio/akamai-curl.sh
curl wrapper for Akamai debugging
#!/bin/sh
usage() {
echo "usage: $0 [-s] [-v] [-L] [-h HTTPHOST] [-X HTTPMETHOD] URL"
exit 1
}
args=`getopt svLX:h: $*`
if [ $? != 0 ] ; then
usage