🏳️🌈
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// [Noted in the comments below on 2023-10 - this script might not work very well anymore due to Elon ruining Twitter] | |
// [Updated 2021-01-18 w/new selectors] | |
// go to your account Likes page and run this in the console: | |
function scrollToLoadMore() { | |
// keep scrolling if twitter tries to stop loading more. | |
// scroll up, then down to force infinite load. | |
window.scrollTo(0, 0); | |
setTimeout(function() { | |
window.scrollBy(0, 9999999999); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var renderSVG = function(svgEl, renderedCallback, jpgQuality) { | |
// WARNING! Inline <image> tags must have a base64-encoded image as their source. Linked image files will not work. | |
// transform svg into base64 image | |
var s = new XMLSerializer().serializeToString(svgEl); | |
var uri = 'data:image/svg+xml;base64,' + window.btoa(s); | |
// load svg image into canvas | |
var image = new Image(); | |
image.onload = function() { | |
var canvas = document.createElement('canvas'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var els = document.querySelectorAll('span[download_url]') | |
for(var i=0; i < els.length; i++){ | |
(function(){ | |
var attr = els[i].getAttribute('download_url'); | |
if(attr.indexOf('jpg:https') != -1){ | |
var url = 'https' + attr.split('jpg:https')[1]; | |
setTimeout(function(){ | |
document.location.href = url; | |
}, i * 1000) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.hide | |
opacity: 0 | |
visibility: hidden | |
// to be added to .hide after init | |
.hide-ready | |
transition: visibility 0s linear 0.4s, opacity 0.4s linear | |
-webkit-transition: visibility 0s linear 0.4s, opacity 0.4s linear | |
.hide-ready.showing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
disableForms: (page) -> | |
@formInputs = page.$el.find('input[tabindex], textarea[tabindex]') | |
@formInputs.off 'keydown', @handleTab | |
@formInputs.blur() | |
enableForms: (page) -> | |
@formInputs = page.$el.find('input[tabindex], textarea[tabindex]') | |
@formInputs.on 'keydown', @handleTab | |
handleTab: (e) => |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// check existence of a local file within an app bundle ------------------------------------- | |
NSString *soundFile = @"sound.wav"; | |
NSFileManager* manager; | |
manager = [NSFileManager defaultManager]; | |
if([manager fileExistsAtPath:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:soundFile]]) | |
printf("file Exists...\n\n"); | |
else | |
printf("File not exist...\n\n"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# file copying & filesystem stuff ############################## | |
# copy massive directories | |
sudo cp -R -n -p /Volumes/RAID01/_backup_laptop /Volumes/RAID2TB/machine_backups/ | |
# or use rsync | |
sudo rsync -rltgoDv /Volumes/RAID02/ /Volumes/RAID06/ | |
# diff directories | |
diff -rq /Volumes/RAID01/_backup_laptop /Volumes/RAID2TB/machine_backups/_backup_laptop/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// webkit-only .sass -------------------------------- | |
@media (min-width: 20px) and (max-width: 480px) and (-webkit-min-device-pixel-ratio: 1.5) | |
#site-loader-inner | |
background: transparent url('mobile/loaders/[email protected]', image) | |
@media (min-width: 20px) and (max-width: 480px) and (-webkit-max-device-pixel-ratio: 1.5) | |
#site-loader-inner | |
background: transparent url('mobile/loaders/loader-spin.png', image) |