View followers.js
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
let $follows = document.querySelector('div[data-testid="primaryColumn"] section > h1 + div[aria-label] > div') | |
let handles = new Set() | |
let finishTimeout | |
let observer | |
function finish() { | |
if (finishTimeout) { | |
clearTimeout(finishTimeout) | |
} | |
finishTimeout = setTimeout(() => { |
View main.dart
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
import 'package:flutter/material.dart'; | |
void main() { | |
runApp( | |
MaterialApp( | |
debugShowCheckedModeBanner: false, | |
theme: ThemeData( | |
primarySwatch: Colors.deepOrange, | |
), | |
home: Scaffold( |
View userChrome.css
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
/* Remove the gap to the left and right of the title tab bar */ | |
#TabsToolbar hbox.titlebar-spacer[type="pre-tabs"], | |
#TabsToolbar hbox.titlebar-spacer[type="post-tabs"] { | |
display: none !important; | |
} | |
/* Remove the buttons on the right of the location bar */ | |
#page-action-buttons { | |
display: none !important; | |
} |
View package-changelog.js
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
/** | |
* Generates changelog Markdown for pinned npm packages in a package.json diff | |
* | |
* Usage: git diff package.json | node package-changelog.js | |
*/ | |
let fs = require('fs') | |
let changes = fs.readFileSync(0, 'utf-8') |
View repro.lua
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
local obs = obslua | |
--- name of a scene item | |
local source_name = '' | |
--- get the name of the current scene | |
local function current_scene_name() | |
local source = obs.obs_frontend_get_current_scene() | |
local name = obs.obs_source_get_name(source) | |
obs.obs_source_release(source) |
View package.ts
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
import * as path from 'https://deno.land/x/fs/path.ts' | |
export { path } |
View .babelrc-default
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
{ | |
"presets": [ | |
"@babel/env", | |
], | |
"plugins": [ | |
"add-module-exports" | |
] | |
} |
View checkLogins.js
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
function sha1(input) { | |
let converter = Components.classes['@mozilla.org/intl/scriptableunicodeconverter'] | |
.createInstance(Components.interfaces.nsIScriptableUnicodeConverter) | |
converter.charset = 'UTF-8' | |
let data = converter.convertToByteArray(input) | |
let ch = Components.classes['@mozilla.org/security/hash;1'] | |
.createInstance(Components.interfaces.nsICryptoHash) | |
ch.init(ch.SHA1) | |
ch.update(data, data.length) | |
let hash = ch.finish(false) |
View userChrome.css
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
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul); | |
/* Remove the gap to the left of the title tab bar */ | |
#TabsToolbar hbox.titlebar-placeholder[type="pre-tabs"] { | |
display: none !important; | |
} | |
/* Remove the buttons on the right of the location bar */ | |
#page-action-buttons { | |
display: none !important; |
View updatePasswords.js
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
function updatePasswords() { | |
let oldPassword = prompt('Old password:') | |
if (!oldPassword) return | |
let loginManager = Components.classes['@mozilla.org/login-manager;1'] | |
.getService(Components.interfaces.nsILoginManager) | |
let matchingLogins = loginManager.getAllLogins().filter(l => l.password === oldPassword) | |
let matchCount = matchingLogins.length | |
if (matchCount === 0) return alert('No matching logins found') |
NewerOlder