Skip to content

Instantly share code, notes, and snippets.

@dropmeaword
dropmeaword / browser_history.md
Last active Sep 28, 2020
Playing around with Chrome's history
View browser_history.md

Browser histories

Unless you are using Safari on OSX, most browsers will have some kind of free plugin that you can use to export the browser's history. So that's probably the easiest way. The harder way, which seems to be what Safari wants is a bit more hacky but it will also work for other browsers. Turns out that most of them, including Safari, have their history saved in some kind of sqlite database file somewhere in your home directory.

The OSX Finder cheats a little bit and doesn't show us all the files that actually exist on our drive. It tries to protect us from ourselves by hiding some system and application-specific files. You can work around this by either using the terminal (my preferred method) or by using the Cmd+Shft+G in Finder.

Finder

Once you locate the file containing the browser's history, copy it to make a backup just in case we screw up.

@cenkalti
cenkalti / jenkins-home-git.sh
Last active Sep 28, 2020
Backup Jenkins home periodicallly with git.
View jenkins-home-git.sh
#!/bin/bash
# Setup
#
# - Create a new Jenkins Job
# - Mark "None" for Source Control Management
# - Select the "Build Periodically" build trigger
# - configure to run as frequently as you like
# - Add a new "Execute Shell" build step
# - Paste the contents of this file as the command
@achacttn
achacttn / js
Last active Sep 28, 2020
Longest subarray with sum <= k
View js
const longestSubarrayLength = (arr, k) => {
let longestLength = 0;
for (let i = 0; i < arr.length; i++) {
let currentSum = 0;
let currentCount = 0;
let currentSlice = arr.slice(i);
console.log('currentslice: ', currentSlice);
// for current slice, add values as long as sum is <= k
for (let j = 0; j < currentSlice.length; j++) {
if (currentSum + currentSlice[j] <= k) {
@jjmato
jjmato / Powered by Neko-Box!
Last active Sep 28, 2020
πŸŽ€ AniList Activity - 1 week ago...
View Powered by Neko-Box!
chicoxin watched episode 2 - 3 of...
Enen no Shouboutai: Ni no Shou
β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”
πŸ“’ 0 | πŸ’– 0
@tabreturn
tabreturn / pypybox2d+processing.py.md
Last active Sep 28, 2020
pypybox2d+processing.py.md
View pypybox2d+processing.py.md

Processing.py + pypybox2d (Physics Library)

What is Box2d?

Box2D is a free open source 2-dimensional physics simulator engine written in C++ by Erin Catto and published under the zlib license. It has been used in Crayon Physics Deluxe, Limbo, Rolando, Incredibots, Angry Birds, Tiny Wings, Shovel Knight, Transformice, Happy Wheels, and many online Flash games, as well as iPhone, iPad and Android games using the Cocos2d or Moscrif game engine and Corona framework.

The engine has been ported to many other programming languages and environments, including Java, Adobe Flash (in ActionScript and Haxe languages), C#, Lua, JavaScript, and D. Bindings exist to use the compiled library from Python, DarkBASIC and BBC_BASIC.

Box2D performs constrained rigid body simulation. It can simulate bodies composed of convex polygons, circles, and edge shapes. Bodies are joined together with joints and acted upon by forces. The engine also applies gravity, friction, and restitution.

@agentcooper
agentcooper / 0.README.md
Last active Sep 28, 2020
Telegram chat backup/export
View 0.README.md

How to use

  1. Login to https://web.telegram.org
  2. Copy-paste contents of telegram-scripts.js into JS console
  3. Run showContacts() to get the list of contacts with ids
  4. Run saveChat(userId) where userId is the id from step 3

Process can take a while, check console for progress. Occasionall FLOOD_WAIT errors are expected. Once done, browser will download the JSON file.

Motivation

@sjx233
sjx233 / 1-monitor-p1000.svg
Last active Sep 28, 2020
ζ΄›θ°· P1000 ι€šθΏ‡ηŽ‡ηš„ε˜εŠ¨
View 1-monitor-p1000.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View βœ… Latest GitHub activities
πŸ’ͺ Opened PR #15 in chun37/discrap
πŸ—£ Commented on #159 in blitz-js/blitzjs.com
πŸŽ‰ Merged PR #3 in yuta0801/scrapbox-reader
πŸ’ͺ Opened PR #3 in yuta0801/scrapbox-reader
πŸ’ͺ Opened PR #308 in progfay/scrapbox-parser
@CyrilNb
CyrilNb / [LOL] Today matches - Official
Last active Sep 28, 2020
UPDATE GIST by python cron job
View [LOL] Today matches - Official
[{"original_scheduled_at": "2020-09-28T17:00:00Z", "videogame": {"id": 1, "name": "LoL", "slug": "league-of-legends"}, "draw": false, "status": "not_started", "number_of_games": 5, "tournament_id": 4852, "winner_id": null, "winner": null, "begin_at": "2020-09-28T17:00:00Z", "videogame_version": null, "forfeit": false, "live_url": null, "modified_at": "2020-09-25T22:41:38Z", "name": "Round 1: IZI vs LDLC", "detailed_stats": true, "games": [{"begin_at": null, "complete": false, "detailed_stats": true, "end_at": null, "finished": false, "forfeit": false, "id": 219038, "length": null, "match_id": 571937, "position": 1, "status": "not_started", "video_url": null, "winner": {"id": null, "type": null}, "winner_type": null}, {"begin_at": null, "complete": false, "detailed_stats": true, "end_at": null, "finished": false, "forfeit": false, "id": 219039, "length": null, "match_id": 571937, "position": 2, "status": "not_started", "video_url": null, "winner": {"id": null, "type": null}, "winner_type": null}, {"begin_at":
View πŸ”ŠπŸŽΆ My last week in music (top tracks)
Elastinen: Suutele Suull β–ˆβ–ˆβ–Šβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 2 times
Kygo: Hot Stuff β–ˆβ–ˆβ–Šβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 2 times
Alan Walker: Sing me to Sl β–ˆβ–β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 1 time
Avicii: SOS (feat. Al β–ˆβ–β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 1 time
Avicii: Tough Love (f β–ˆβ–β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 1 time
Axwell /\ Ing: On My Way β–ˆβ–β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 1 time
Basic Element: I’ll Neve β–ˆβ–β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 1 time
Bastille: survivin' β–ˆβ–β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 1 time
Cartoons: Let's Go Chil β–ˆβ–β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 1 time
Clean Bandit: Tick Tock β–ˆβ–β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 1 time
You can’t perform that action at this time.