Skip to content

Instantly share code, notes, and snippets.

@jonaslund
jonaslund / brainrot.md
Last active February 1, 2025 17:27
Optimal Brain Rot Strategy Guide

[Deliver all instructions in a calm, meditative voice, as if teaching a wellness class]

OPTIMAL BRAIN ROT: A GUIDED PRACTICE

Duration: 20 minutes

Delivery: Over FaceTime

Required: Phone, laptop, tablet (if available)

@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);
}
@jonaslund
jonaslund / .zshrc
Created November 12, 2012 01:05
zsh config
# Path to your oh-my-zsh configuration.
ZSH=$HOME/v/oh-my-zsh
# Set name of the theme to load.
ZSH_THEME="mgutz"
# Set to this to use case-sensitive completion
# CASE_SENSITIVE="true"
# Comment this out to disable weekly auto-update checks
0xe8771d21D612c91255A20Dfa79EB612E07294FD1
@jonaslund
jonaslund / fbScrape.js
Created August 15, 2012 10:18
Casperjs script to screenshot an entire Facebook Post
// Using Casperjs to screenshot an entire Facebook Post */
var casper = require('casper').create({
clientScripts: [
'jquery.js'
]
});
//login to facebook
casper.start('https://www.facebook.com/', function() {
this.fill('#login_form', { email: 'email', pass: 'password' }, true);
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 / 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: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>