Skip to content

Instantly share code, notes, and snippets.

View julian-weinert's full-sized avatar

Julian F. Weinert julian-weinert

  • Berlin, Germany
View GitHub Profile
@julian-weinert
julian-weinert / remove-youtube-scrollbar.js
Last active June 15, 2021 03:02
User script which can be used with TamperMonkey and similar browser extensions.
// ==UserScript==
// @name YouTube Remove Themed Scrollbar
// @version 1.0.1
// @description This script removes the themed YT-scrollbar one second after load.
// @author Julian Weinert
// @run-at document-start
// @match *://*.youtube.com/*
// @match *://*.youtu.be/*
// @updateURL https://gist.githubusercontent.com/julian-weinert/425fa15d7117785e84cad6fbf8df460c/raw/remove-youtube-scrollbar.js
// ==/UserScript==
@julian-weinert
julian-weinert / p5-round.js
Created January 28, 2018 13:12
P5.js random rounding test; I'm comparing JavaScript rounding functions in P5 to prove that ceil and floor will omit one pissibility.
function evaluate(callback, from, to, count) {
var results = {};
for (var i = 0; i < count; i++) {
var result = callback(from, to);
results[result] = results[result] ? results[result] + 1 : 1;
}
return results;
}
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7706" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="GUs-KQ-G3b">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
</dependencies>
<scenes>
<!--Navigation Controller-->
<scene sceneID="JDN-Wl-fKI">
<objects>
<navigationController id="GUs-KQ-G3b" sceneMemberID="viewController">
@julian-weinert
julian-weinert / GISTViewController.m
Created August 26, 2015 09:48
`-scrollViewDidScroll` not called when `UITableView` removes a section and must scroll
@interface GISTViewController : UITableViewController
@end
@implementation GISTViewController
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 3;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {