Skip to content

Instantly share code, notes, and snippets.

// Wifi Credentials
const WIFI_NAME = "YOURSSID";
const WIFI_PASS = "YOURPASS";
// Your location latitude and longitude
const lat = 'YOURLAT';
const lon = 'YOURLON';
// Required libs
@gomako
gomako / cylinder.pde
Created June 11, 2018 08:02
Draw a cylinder or cone in Processing
// Originally found at https://forum.processing.org/one/topic/draw-a-cone-cylinder-in-p3d.html
void cylinder(float bottom, float top, float h, int sides)
{
pushMatrix();
translate(0,h/2,0);
float angle;
float[] x = new float[sides+1];
// Clear interval and timeout as they mess things up
clearInterval();
clearTimeout();
clearWatch();
// Setup WiFi
digitalWrite(B9,1); // enable on Pico Shim V2
Serial2.setup(115200, { rx: A3, tx : A2 });
const proxy = 'http://httptohttps.mrtimcakes.com/';
@gomako
gomako / form-group.sublime-snippet
Created November 11, 2015 10:52
Laravel form group snippet for bootstrap
<snippet>
<content><![CDATA[
<div class="form-group">
{!! Form::label('${1:name}', '${2:value}') !!}
{!! Form::input('${3:type}', '${1}', '${4:value}', ['class' => 'form-control', ${5:'required'}]) !!}
</div>
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>fg</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
var elixir = require('laravel-elixir');
/*
|--------------------------------------------------------------------------
| Elixir Asset Management
|--------------------------------------------------------------------------
|
| Elixir provides a clean, fluent API for defining some basic Gulp tasks
| for your Laravel application. By default, we are compiling the Less
| file for our application, as well as publishing vendor resources.
|
@gomako
gomako / gist:326969a0c33e8ea1cb5d
Created April 18, 2015 22:00
Wordpress search and replace
UPDATE wp_posts SET post_content = REPLACE (
post_content,
'Item to replace here',
'Replacement text here');
@gomako
gomako / wp_search_replace
Created April 17, 2014 13:36
MySQL Search and replace in wordpress database
UPDATE wp_posts SET post_content = REPLACE (
post_content,
'Item to replace here',
'Replacement text here');
{
"files":
{
"jquery" : "http://code.jquery.com/jquery.js",
"jquery.min" : "http://code.jquery.com/jquery.min.js",
"jquery-cookie" : "https://raw.github.com/carhartl/jquery-cookie/master/jquery.cookie.js",
"jquery-dotimeout" : "https://raw.github.com/cowboy/jquery-dotimeout/master/jquery.ba-dotimeout.min.js",
"jquery-extra-selectors" : "https://raw.github.com/keithclark/JQuery-Extended-Selectors/master/jquery-extra-selectors.js",
"jquery-flexslider" : "https://raw.github.com/mbmufffin/FlexSlider/master/jquery.flexslider-min.js",
"jquery-mediaelement" : "https://raw.github.com/johndyer/mediaelement/master/build/mediaelement-and-player.js",