Skip to content

Instantly share code, notes, and snippets.

View aaronm67's full-sized avatar
🦎

Aaron Marasco aaronm67

🦎
View GitHub Profile
@aaronm67
aaronm67 / mobile-styles.js
Created November 17, 2019 17:29
Makes reddit mobile styles suck slightly less
// ==UserScript==
// @name Reddit mobile styles slightly less suck
// @namespace https://www.reddit.com/
// @version 0.1
// @description Make reddit mobile style suck a little less
// @author aaronm67
// @match https://www.reddit.com/*
// @grant none
// ==/UserScript==
(function() {
@aaronm67
aaronm67 / SassMeister-input.sass
Created March 12, 2015 19:31
Generated by SassMeister.com.
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
%clearfix
overflow: hidden
.test
@extend %clearfix
@aaronm67
aaronm67 / gist:7944144
Created December 13, 2013 13:23
Calculate flyover distance between two lat/lng points.
/// <summary>
/// Earth Radius in miles
/// </summary>
private const double EarthRadius = 3956.0;
/// <summary>
/// Degrees to radians
/// </summary>
private static double ToRadian(double degrees)
{
// ↑ ↑ ↓ ↓ ← → ← → will hide prices from the quoting page -- often customers come in, and it's very awkward to have the "% discount" shown on the quoting page.
$(function() {
var magic = [ Keys.UP, Keys.UP, Keys.DOWN, Keys.DOWN, Keys.LEFT, Keys.RIGHT, Keys.LEFT, Keys.RIGHT ];
var input = [];
$(document).on("keydown", function(e) {
input.push(e.keyCode);
if (input.length > magic.length) {
input.shift();
}
@aaronm67
aaronm67 / gist:7456270
Created November 13, 2013 20:57
require build
grunt.initConfig({
requirejs: {
compile: {
options: {
// path to your base js directory
baseUrl: 'base path',
// this is going to be the path to the page where you include your libraries. This file includes stuff like:
// require.config({}) - your require config
// require['pages/page1', 'pages/page2', etc]
mainConfigFile: 'base path' + 'codestuff.js',
public class ProductRepository {
public IEnumerable<Product> GetAll()
{
return sitecore query by product path;
}
public IEnumerable<Product> GetFiltered(IEnumerable<Guid> ids)
{
return this.GetAll().Where(ids contains this.id);
}
@aaronm67
aaronm67 / gist:7313115
Created November 5, 2013 02:56
-O2 compiler error.
undefined:60
throw msg;
^
Assertion failed: Cannot grow asm.js heap
Traceback (most recent call last):
File "/home/aaron/Programs/emscripten/emscripten.py", line 859, in <module>
_main(environ=os.environ)
File "/home/aaron/Programs/emscripten/emscripten.py", line 847, in _main
temp_files.run_and_clean(lambda: main(
File "/home/aaron/Programs/emscripten/tools/tempfiles.py", line 39, in run_and_clean
@aaronm67
aaronm67 / free codecs
Created November 2, 2013 14:36
Codecs - Free
DEV.L. mpeg1video MPEG-1 video
DEV.L. mpeg2video MPEG-1 video
..V.L. mpegvideo_xvmc MPEG-1/2 video XvMC (X-Video Motion Compensation)
DEV.L. h261 H.261
DEV.L. h263 H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2
DEV.L. rv10 RealVideo 1.0
DEV.L. rv20 RealVideo 1.0
DEVIL. mjpeg Motion JPEG
D.VIL. mjpegb Apple MJPEG-B
.EVI.S ljpeg Lossless JPEG
Received file
Received command: -codecs
avconv version v9-2344-g25c7db7, Copyright (c) 2000-2013 the Libav developers
built on Nov 1 2013 16:21:21 with emcc (Emscripten GCC-like replacement) 1.7.1 (commit 350550a5ccfacd19f512bca2ded186e143ea9579)
Codecs:
D..... = Decoding supported
.E.... = Encoding supported
..V... = Video codec
..A... = Audio codec
..S... = Subtitle codec
Received file
Received command: -i h264.mkv -vcodec mpeg4 -acodec copy -qscale:v 1 output/output.mpeg
avconv version v9-2344-g25c7db7, Copyright (c) 2000-2013 the Libav developers
built on Nov 1 2013 16:21:21 with emcc (Emscripten GCC-like replacement) 1.7.1 (commit 350550a5ccfacd19f512bca2ded186e143ea9579)
Warning: Enlarging memory arrays, this is not fast, and ALLOW_MEMORY_GROWTH is not fully tested with all optimizations on! 16875520,16777216
Guessed Channel Layout for Input Stream #0.2 : stereo
Input #0, matroska,webm, from 'h264.mkv':
Metadata:
title : Harry Potter 4[Eng-Hindi]Dual.Audio BRRIP 720p-=[champ_is_here]=-
Duration: 00:00:57.60, start: 0.000000, bitrate: N/A