Skip to content

Instantly share code, notes, and snippets.

Andrew Collington amnuts

Block or report user

Report or block amnuts

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 CMakeLists.txt
cmake_minimum_required(VERSION 3.7)
project(esp_vt100_firmware)
set(CMAKE_CXX_STANDARD GNU99)
set(SOURCE_FILES
include/uart_hw.h
include/user_config.h
user/io.c
user/io.h
View serviceworker.js
"use strict";
/* A version number is useful when updating the worker logic,
allowing you to remove outdated cache entries during the update.
*/
var version = 'v1::';
/* These resources will be downloaded and cached by the service worker
during the installation process. If any resource fails to be downloaded,
then the service worker won't be installed either.
@rowlandekemezie
rowlandekemezie / ajaxWithReduxSaga.js
Last active Oct 14, 2018
A basic implementation of AJAX with redux-saga
View ajaxWithReduxSaga.js
const { applyMiddleware, createStore } = Redux;
const createSagaMiddleware = ReduxSaga.default;
const { put, call } = ReduxSaga.effects;
const { takeLatest } = ReduxSaga;
const { connect, Provider } = ReactRedux;
// GitHub API
const gitHubApi = (username) => {
return fetch(`https://api.github.com/users/${username}`)
.then(response => {
@iamkirkbater
iamkirkbater / _mixins.scss
Last active Dec 29, 2015
Mixins I commonly use.
View _mixins.scss
@mixin font-smoothing($value: on) {
@if $value == on {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
@else {
-webkit-font-smoothing: subpixel-antialiased;
-moz-osx-font-smoothing: auto;
}
}
@fdemiramon
fdemiramon / pre-commit
Created May 12, 2015
Pre-commit hook for git with phpcs and phpcbf (auto-correct obvious violations)
View pre-commit
#!/bin/sh
PROJECT=`php -r "echo dirname(dirname(dirname(realpath('$0'))));"`
STAGED_FILES_CMD=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep \\\\.php`
# Determine if a file list is passed
if [ "$#" -eq 1 ]
then
oIFS=$IFS
IFS='
@iamkirkbater
iamkirkbater / htla.js
Created Apr 7, 2015
Hamburger to Left Arrow Animation
View htla.js
(function() {
"use strict";
var toggles = document.querySelectorAll(".cmn-toggle-switch");
for (var i = toggles.length - 1; i >= 0; i--) {
var toggle = toggles[i];
toggleHandler(toggle);
};
@MattWilcox
MattWilcox / build_nginx.sh
Last active Sep 3, 2019
Fetch, build, and install the latest nginx with the latest OpenSSL for RaspberryPi
View build_nginx.sh
#!/usr/bin/env bash
# names of latest versions of each package
export VERSION_PCRE=pcre-8.38
export VERSION_OPENSSL=openssl-1.0.2d
export VERSION_NGINX=nginx-1.9.7
# URLs to the source directories
export SOURCE_OPENSSL=https://www.openssl.org/source/
export SOURCE_PCRE=ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
View example-list.js
/**
* plugin.js
*
* Copyright, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://www.tinymce.com/license
* Contributing: http://www.tinymce.com/contributing
*/
View README.md
@r-sal
r-sal / PHPExcel_Basics.md
Last active Sep 16, 2019
PHPExcel Notes and code snippets
View PHPExcel_Basics.md

Basics

Creating a new PHPExcel Object.

    $this->PHPExcel = new PHPExcel();

Working with sheets

Creating a new sheet:

You can’t perform that action at this time.