Skip to content

Instantly share code, notes, and snippets.

@jugglinmike
jugglinmike / README.md
Created February 1, 2019 19:44 — forked from twolfson/README.md
How Python modules are resolved

Python modules have 2 syntaxes for importing.

import x
from x import y

import x

Absolute imports are used for importing top-level modules and only top level modules. These are ones that are globally installed, either inside of Python core or via a package manager (e.g. pip).

/**
* Copyright (c) 2017 and later, Isiah Meadows. Licensed under the ISC License.
*/
// Execute the Test262 test suite with a parser. This checks for parser
// conformance correctly, and requires little configuration on your part.
//
// Options supported, `opts.test262Dir`, `opts.test`, and `opts.parse` are
// required:
// - `opts.test262Dir` - The directory to a clone of the Test262 suite
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
I, Dionysis Zindros, a contributor of JSHint under the e-mail dionyziz@kamibu.com
am agreeing to the relicensing of my contributions under the MIT Expat license [1]
I understand that my contributions were previously available under the JSON license [2]
I agree that in particular the following contributions may be relicensed:
@jugglinmike
jugglinmike / checkt440s.sh
Last active December 21, 2015 12:39 — forked from alunny/checkmc.sh
#!/bin/bash
while true
do
curl -s http://shop.lenovo.com/us/en/laptops/thinkpad/t-series/ | grep -i "t440s"
if [ $? -ne 0 ]
then
echo "not found at `date`"
sleep 1800
else

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@jugglinmike
jugglinmike / youtube-comments.user.js
Created August 14, 2012 12:58 — forked from tbranyen/youtube-comments.user.js
A user script for removing bullshit YouTube comments.
// ==UserScript==
// @name RemoveYouTubeComments
// @description Remove bullshit YouTube comments.
// @match http://www.youtube.com/*
// @author Tim Branyen
// @version 1.0
// ==/UserScript==
// Find the comments view element.
var commentsView = document.getElementById("comments-view");
var subject = "[Subject] is dead, long live [Subject]",
regex = /\[Subject\]/g;
while( regex.test(subject) ) {
subject = subject.replace( regex, subject );
console.log( subject );
}
// Warning... I killed node with this.
// FATAL ERROR: CALL_AND_RETRY_0 Allocation failed - process out of memory