Skip to content

Instantly share code, notes, and snippets.

Avatar

Julian F. Weinert julian-weinert

  • Berlin, Germany
View GitHub Profile
@julian-weinert
julian-weinert / remove-youtube-scrollbar.js
Last active Jun 15, 2021
User script which can be used with TamperMonkey and similar browser extensions.
View remove-youtube-scrollbar.js
// ==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 Jan 28, 2018
P5.js random rounding test; I'm comparing JavaScript rounding functions in P5 to prove that ceil and floor will omit one pissibility.
View p5-round.js
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;
}
View Main.storyboard
<?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 Aug 26, 2015
`-scrollViewDidScroll` not called when `UITableView` removes a section and must scroll
View GISTViewController.m
@interface GISTViewController : UITableViewController
@end
@implementation GISTViewController
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 3;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {