Skip to content

Instantly share code, notes, and snippets.

@jonaslund
jonaslund / jonas.js
Last active September 7, 2022 14:34
jonas.js
class Jonas {
constructor() {
this.video = "1_0";
this.added = false;
this.loaded = false;
this.jonas = "";
this.circle_incr = 0;
this.start_x = 200;
this.start_y = 200;
$(window).scroll(function(f) {
var scrolled = $(window).scrollTop();
$(".artist").each(function() {
if (isElementInViewport($(this))) {
if ($(this).attr("data-id") === "23") {} else {
if ($(this).attr("data-loaded") !== "1") {
var e = $(this).attr("data-src");
$(this).attr("data-loaded", 1);
$(this).find("iframe").attr("src", e);
}
0xe8771d21D612c91255A20Dfa79EB612E07294FD1
var url = 'http://url.com';
var screenIndex = 0;
var amountOfFrames = 30 * 60 * 60;
// var amountOfFrames = 12000;
// var amountOfFrames = 1000;
//frames, one minute, minutes
var page = require('webpage').create();
// page.viewportSize = { width: 786, height: 1024 };
page.viewportSize = { width: 1080, height: 1920 };
@jonaslund
jonaslund / gist:a3c622023890a4779452
Created June 15, 2015 19:58
Friends of Friends
MATCH (j:Artist {name:""})-[:`WORKED_WITH`]->()<-[:`WORKED_WITH`]-(c),
(c)-[:`WORKED_WITH`]->()<-[:`WORKED_WITH`]-(coc)
WHERE coc <> j AND NOT((j)-[:`WORKED_WITH`]->()<-[:`WORKED_WITH`]-(coc))
RETURN coc.name, count(coc)
ORDER BY count(coc) DESC
LIMIT 10;
@jonaslund
jonaslund / download.js
Last active August 29, 2015 14:02
Download.js
var jsdom = require("jsdom");
var http = require('http-get');
jsdom.env(
"http://jonaslund.biz",
["http://code.jquery.com/jquery.js"],
function (errors, window) {
var images = window.$("img");
for (var i = images.length - 1; i >= 0; i--) {
var src = console.log(images[i]._attributes.src);
@jonaslund
jonaslund / proust2000.js
Created December 16, 2013 16:13
In Search Of Lost Time
var consumer_key = '',
consumer_secret = '',
oauth_token_secret = '',
user_id = '',
oauth_token = '',
screen_name = '',
fs = require("fs"),
cronJob = require('cron').CronJob;
var twitterAPI = require('node-twitter-api');
@jonaslund
jonaslund / paypal-php-howto.php
Created February 7, 2013 19:51
Paypal For Paolo
<!-- the form -->
<?php
$paypalURL = "https://www.paypal.com/cgi-bin/webscr";
$paypalSandBox = "https://www.sandbox.paypal.com/cgi-bin/webscr";
?>
<form action="<?php echo $paypalSandBox ?>?sandbox=1" method="post" class="hidden payPalForm">
<div>
<input type="hidden" name="cmd" value="_donations" />
<input type="hidden" name="item_name" value="" />
@jonaslund
jonaslund / index.html
Created November 20, 2012 20:42
A CodePen by AKM2. Painting - http://jsdo.it/akm2/zAOw
<div id="message">Drag mouse to paint.</div>
<canvas id='c'></canvas>
@jonaslund
jonaslund / index.html
Created November 20, 2012 20:41
A CodePen by Jack Rugile. Canvas Orbital Trails - Click and drag anywhere on the screen to create new trails.
<div id="control-panel">
<p>Click and drag to make more!</p>
<label>Trails: </label>
<input type="checkbox" id="trail" name="trail" checked/>
<button id="clear">Clear</button>
</div>
<canvas id="c"></canvas>