Skip to content

Instantly share code, notes, and snippets.

View idac73's full-sized avatar
🤘
💻🥁🔥

Joshua Sherer idac73

🤘
💻🥁🔥
View GitHub Profile
@idac73
idac73 / cloudSettings
Last active September 29, 2020 15:44
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-09-29T15:44:08.124Z","extensionVersion":"v3.4.3"}
@idac73
idac73 / cloudSettings
Last active September 28, 2020 23:49
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-09-28T23:49:53.031Z","extensionVersion":"v3.4.3"}
@idac73
idac73 / ProductInfoAPI.cs
Last active September 12, 2017 14:18
Umbraco ASP.NET Web API 2 (C#) Example
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Http;
using Umbraco.Core;
using Umbraco.Web;
namespace ProductInfoSPA.Controllers
{
// Define the initial path for the API.
@idac73
idac73 / c9.md
Last active October 27, 2016 16:38
C9.io / commands cheatsheet

C9 Environment Variables

process.env.PORT process.env.IP

MongoDB manual config / start

mkdir data echo 'mongod --bind_ip=$IP --dbpath=data --nojournal --rest "$@"' > mongod chmod a+x mongod mongod --smallfiles --nojournal

@idac73
idac73 / Character Map Dump To HTML
Last active January 2, 2016 09:59
Creating a font? Checking for the entity to that "special character?" Quick and easy. Open a about:blank tab and paste, run this Gist in your console and either inspect the specific element for the entity or let the title attribute display it to you.
charMap = "";
for (i=33;i<65500;i++) {
charMap += "<span title='&amp;#"+i+";'>&#"+i+";</span> ";
}
document.body.innerHTML = charMap;
@idac73
idac73 / legacy_ie_css_exceptions
Last active December 31, 2015 06:08
Legacy IE CSS exceptions.
<style type="text/css">
color: green\9; /* all ie */
color: green\0/; /* lte ie8 */
*color: green; /* lte ie7 */
_color: green; /* ie6 */
</style>
@idac73
idac73 / regex_remove_string
Created September 27, 2013 15:04
Regex to remove string
element.className.replace(/(?:^|\s)disabled(?!\S)/g,'');
@idac73
idac73 / copy_xml.xsl
Last active December 11, 2015 13:38
XSL - two techniques for making XML available for transformation
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xslt="http://xml.apache.org/xslt" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes" encoding="UTF-8" xslt:indent-amount="2" />
<!-- Technique #1 -->
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
@idac73
idac73 / anchor_tag_single_hash_disable_redirect.js
Created January 23, 2013 15:43
jQuery disable redirect on all anchor tags with only a hash # in the href attribute
$("a[href='#']").click(function(e) {
e.preventDefault();
});
@idac73
idac73 / simple_cross_browser_console.js
Created January 23, 2013 15:37
Simple cross-browser console output javascript
if(window.navigator.appName == "Microsoft Internet Explorer") {
window.console.log("MSIE console output");
} else {
console.log("WebKit and Gecko console output");
}