Skip to content

Instantly share code, notes, and snippets.

View JustMaier's full-sized avatar

Justin Maier JustMaier

View GitHub Profile
@lamchau
lamchau / README.rst
Last active March 26, 2024 05:35
[Chrome/Tampermonkey] Extract *.user.js scripts from LevelDB backup

Restoring Tampermonkey scripts

Chrome stores .user.js scripts in a .ldb, which isn't in a user accessible format to recovery. On some versions of macOS the provided python script can't compile the leveldb package. As a workaround, we can use the node level package to recover our userscripts.

Prerequisite

@JustMaier
JustMaier / demo.html
Last active March 29, 2022 08:46
Simple copy to clipboard functionality in angular without any dependencies
<!-- View it live here: http://codepen.io/anon/pen/waZOjB -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.4/angular.min.js"></script>
<script type="text/javascript" src="https://cdn.rawgit.com/JustMaier/6ef7788709d675bd8230/raw/3d39d50e66d8d77e05656ed7dd09298be7e86f1f/ngClickCopy.js"></script>
<script>
angular.module('app', ['ngClickCopy'])
</script>
<div ng-app="app">
<button ng-click-copy="Hello World">Copy</button>
</div>