Skip to content

Instantly share code, notes, and snippets.

View anr2me's full-sized avatar

AdamN anr2me

  • localhost
View GitHub Profile
@anr2me
anr2me / OpenSimplexNoise.cs
Created June 4, 2018 12:05 — forked from digitalshadow/OpenSimplexNoise.cs
OpenSimplex Noise Refactored for C#
/* OpenSimplex Noise in C#
* Ported from https://gist.github.com/KdotJPG/b1270127455a94ac5d19
* and heavily refactored to improve performance. */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
namespace NoiseTest
@anr2me
anr2me / OpenSimplexNoise.java
Created June 4, 2018 12:05 — forked from KdotJPG/OpenSimplex2S.java
Visually axis-decorrelated coherent noise algorithm based on the Simplectic honeycomb.
/*
* OpenSimplex Noise in Java.
* by Kurt Spencer
*
* v1.1 (October 5, 2014)
* - Added 2D and 4D implementations.
* - Proper gradient sets for all dimensions, from a
* dimensionally-generalizable scheme with an actual
* rhyme and reason behind it.
* - Removed default permutation array in favor of
@anr2me
anr2me / prefixed-office-properties.md
Created April 19, 2018 09:17 — forked from p3t3r67x0/prefixed-office-properties.md
MS Office prefixed style properties can be used for older versions of MS Excel, MS PowerPoint or MS Word when you want to save a document, presentation, workbook, or worksheet as a web document, or even in older versions for MS Outlook.

MS Office prefixed style properties

mso-ansi-font-size

Note: Office only

mso-ansi-font-size: large | larger | <length> | medium | <percentage> | small | smaller | x-large | x-small | xx-large | xx-small
@anr2me
anr2me / GoogleSpreadsheet.html
Created July 24, 2017 04:31 — forked from terrywbrady/GoogleSpreadsheet.html
Sample HTML/JS to parse a Google Spreadsheet
<!doctype html>
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
var spData = null;
function doData(json) {
spData = json.feed.entry;
}
@anr2me
anr2me / OpenWRT.Armbian.OPZ
Created May 14, 2017 17:57 — forked from praveenbm5/OpenWRT.Armbian.OPZ
OpenWRT on Orange Pi Zero using Armbian uBoot and Kernel
Guide:
1. Install Armbian_5.24.161216_Orangepizero_Ubuntu_xenial_3.4.113.img onto a uSD card using Win32DiskImager or Ubuntu Disk Image Writer
2. (Optional) Mount the uSD in Ubuntu Laptop and expand the partition using GParted.
3. Delete everything from uSD except /boot, /lib/modules and /lib/firmware.
4. Mount openwrt-15.05.1-sunxi-root.ext4 on Ubuntu using loopback interface on /mnt/openwrt
@anr2me
anr2me / max_width_email.html
Created April 4, 2017 08:11 — forked from elidickinson/max_width_email.html
Email Template trick: max-width with outlook
<!--[if mso]>
<center>
<table><tr><td width="580">
<![endif]-->
<div style="max-width:580px; margin:0 auto;">
<p>This text will be centered and constrained to 580 pixels even on Outlook which does not support max-width CSS</p>
</div>
<!--[if mso]>
@anr2me
anr2me / gist:8488cb6ccd9d14586029032c95d45803
Created April 3, 2017 04:00 — forked from mhawksey/gist:1442370
Google Apps Script to read JSON and write to sheet
function getJSON(aUrl,sheetname) {
//var sheetname = "test";
//var aUrl = "http://pipes.yahoo.com/pipes/pipe.run?_id=286bbb1d8d30f65b54173b3b752fa4d9&_render=json";
var response = UrlFetchApp.fetch(aUrl); // get feed
var dataAll = JSON.parse(response.getContentText()); //
var data = dataAll.value.items;
for (i in data){
data[i].pubDate = new Date(data[i].pubDate);
data[i].start = data[i].pubDate;
}
@anr2me
anr2me / getSvgFrames.js
Created January 27, 2017 05:22 — forked from shaunlebron/getSvgFrames.js
Convert SWF animation to SVG frames.
/*
You can use this script with Google Swiffy to produce SVG frames from an SWF animation.
1. Upload your SWF file to Google Swiffy --> https://www.google.com/doubleclick/studio/swiffy/
2. Save the swiffy output HTML page locally.
3. Edit the page to include this script with <script src="getSvgFrames.js"></script>
4. Open the page in Firefox to see the SVG download links appear for each frame.
*/
(function(){
var url = window.location.pathname;