Skip to content

Instantly share code, notes, and snippets.

@nutrino
nutrino / 0_reuse_code.js
Created October 15, 2015 03:18
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
using System;
class Customer
{
public string City { get; set; }
}
class Customers
{
private Customer c;
rundll32 winsta.dll,WinStationSwitchToServicesSession
@echo off
SET MyPath=%PATH%
echo %MyPath%
echo --
setlocal EnableDelayedExpansion
SET TempPath="%MyPath:;=";"%"
SET var=
rem @echo off
if ("%1")==() goto endloop
if not (%2)==() cd "%2"
for /D "%%i" in (*) do if not "%%i"=="%1" ren "%%i" "%1"
pushd "%1"
"%0" "%1"
popd
:endloop
@nutrino
nutrino / utmstrip.user.js
Created July 29, 2016 17:33 — forked from paulirish/utmstrip.user.js
userscript: Drop the UTM params from a URL when the page loads
// ==UserScript==
// @name UTM param stripper
// @author Paul Irish
// @namespace http://github.com/paulirish
// @version 1.2
// @description Drop the UTM params from a URL when the page loads.
// @extra Cuz you know they're all ugly n shit.
// @include http*://*?*
// @grant none
// ==/UserScript==
@nutrino
nutrino / url_Medium_remove_location_hash_Greasemonkey.user.js
Last active November 21, 2016 12:53 — forked from iki/Medium: remove location hash.user.js
url: Medium remove location hash Greasemonkey
// ==UserScript==
// @name url: Medium remove location hash Greasemonkey
// @namespace http://efcl.info/
// @description Remove location hash from medium
// @include *#.*
// @version 1
// @grant none
// ==/UserScript==
// TamperMonkey does not work well with hash '#' in @include urls:
@nutrino
nutrino / url_Medium_remove_location_hash_Tampermonkey.user.js
Last active November 21, 2016 12:52
url: Medium remove location hash TamperMonkey workaround because Tampermonkey doesn't support # in include. forked from @iki https://gist.github.com/iki/03af4eda558efd56d038520889afb56a
// ==UserScript==
// @name url: Medium remove location hash TamperMonkey
// @namespace http://efcl.info/
// @description Remove location hash from medium
//// @include https://voice.kadira.io/*
//// @include https://medium.com/*
// @include /^https://.+-[a-z0-9]{11,12}$/
// @version 1
// @grant none
// ==/UserScript==
@nutrino
nutrino / RemoveHash.url
Last active October 31, 2016 07:15
On click, it removes Hash Code from the URL
javascript:history.pushState("", document.title, window.location.pathname + window.location.search);
From
^((?:http|https)://(?:[a-z0-9]+\.|)slideshare\..+)\?.+$
To
$1