Skip to content

Instantly share code, notes, and snippets.

@gagarine
gagarine / bookmarklet-planete.js
Created September 6, 2011 21:06
bookmarklet for sankore
if (typeof jQuery == 'undefined') {
var jQ = document.createElement('script');
jQ.type = 'text/javascript';
jQ.onload = runthis;
jQ.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js';
document.body.appendChild(jQ);
} else {
runthis();
}
@godbox
godbox / x.js
Created October 8, 2009 09:12
Printliminator
CmdUtils.makeBookmarkletCommand({
name: "Printliminator",
url: "javascript:(function(){function%20loadScript(a,b){var%20c=document.createElement('script');c.type='text/javascript';c.src=a;var%20d=document.getElementsByTagName('head')[0],done=false;c.onload=c.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=='loaded'||this.readyState=='complete')){done=true;b()}};d.appendChild(c)}loadScript('http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js?ver=1.3.2',function(){loadScript('http://css-tricks.com/examples/ThePrintliminator/js/printliminator.js',function(){printlimator()})})})()"
})
@godbox
godbox / x.js
Created October 12, 2009 18:32
function getBookmarklets(callback) {
var bookmarklets = {};
var Ci = Components.interfaces;
var Cc = Components.classes;
var bookmarks = Cc["@mozilla.org/browser/nav-bookmarks-service;1"]
.getService(Ci.nsINavBookmarksService);
var history = Cc["@mozilla.org/browser/nav-history-service;1"]
#!/usr/bin/perl
#generates a bookmarklet from a javascript file
#and outputs a html page to drag the link to the bookmark bar
#based on john grubers bookmarklet script:
#http://daringfireball.net/2007/03/javascript_bookmarklet_builder
use strict;
use warnings;
use URI::Escape qw(uri_escape_utf8);
@abi
abi / x
Created February 12, 2009 17:01
function getBookmarklets(callback) {
var bookmarklets = {};
var Ci = Components.interfaces;
var Cc = Components.classes;
var bookmarks = Cc["@mozilla.org/browser/nav-bookmarks-service;1"]
.getService(Ci.nsINavBookmarksService);
var history = Cc["@mozilla.org/browser/nav-history-service;1"]
@ricog
ricog / 00-deploy-quasar-framework-using-aws-amplify-console.md
Last active May 5, 2024 21:20
Deploy Quasar Framework using AWS Amplify Console
  1. Modify build image settings to use the node:12 image (see screenshot below).
  2. Replace the amplify.yml file in the console with this one.

This will start the build using node:12, install Quasar CLI, run quasar build and speficy dist/spa as the output directory.

image

@munrocket
munrocket / wgsl_noise.md
Last active May 5, 2024 21:19
WGSL Noise Algorithms

WGSL Noise Algorithms

Operator % has changed, probably current code with it need a fix

Good and fast integer hash

// https://www.pcg-random.org/
fn pcg(n: u32) -> u32 {
    var h = n * 747796405u + 2891336453u;
    h = ((h >> ((h >> 28u) + 4u)) ^ h) * 277803737u;
'use strict';
// We start by accepting an input string of code, and we're gonna set up two
// things...
function tokenizer(input) {
// A `current` variable for tracking our position in the code like a cursor.
let current = 0;
// And a `tokens` array for pushing our tokens to.
var isMac = navigator.appVersion.indexOf( "Mac" ) != -1;
var HP = navigator.userAgent.indexOf( "HP" ) != -1;
var Sun = navigator.userAgent.indexOf( "Sun" ) != -1;
var IE = document.all;
var IE4 = navigator.appVersion.indexOf( "MSIE 4." ) != -1;
var IE5 = navigator.appVersion.indexOf( "MSIE 5." ) != -1;
var IE50 = navigator.appVersion.indexOf( "MSIE 5.0" ) != -1;
var IE6 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 6.")!=-1)) ? true : false;
var IE7 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 7.")!=-1)) ? true : false;
/*
Narrow non-breaking space before ? ! ; :
espaces fines insécables avant ? ! ; :
*/
import markdownIt from 'markdown-it'