Skip to content

Instantly share code, notes, and snippets.

@raineorshine
raineorshine / memrise-export.js
Last active December 1, 2021 17:02
Export Memrise course words to CSV. There is also a Chrome Extension: https://chrome.google.com/webstore/detail/memrise-export/hcllgkpmoiolndnhmbdceffaidjmkoam
/*
UPDATE: This is now a Chrome Extension: https://chrome.google.com/webstore/detail/memrise-export/hcllgkpmoiolndnhmbdceffaidjmkoam
Source Code: https://github.com/raineorshine/memrise-export
Export Memrise course words to CSV (technically TSV, or "tab separated file", but it is effectively the same).
1. Log into Memrise.
2. Navigate to the course page you would like to export (e.g. https://app.memrise.com/course/2156672/german-random-01/).
3. Open the browser's Developer Console (https://support.airtable.com/hc/en-us/articles/232313848-How-to-open-the-developer-console)
@karmankertesz
karmankertesz / disqus-delete.js
Created September 30, 2016 23:11
Console commands to delete Disqus comments
/*
These are Javascript console commands to delete your public Disqus comments to protect your privacy.
Keep in mind:
"Comments are not anonymized when they are deleted and can still be seen by moderators."
https://help.disqus.com/customer/portal/articles/466229
Open your profile page:
https://disqus.com/by/<username>/comments/
@diastremskii
diastremskii / create-new-file.ahk
Last active October 24, 2022 06:25
AutoHotKey: Create a new file with Alt+N keyboard shortcut in Windows Explorer
; This is part of my AutoHotKey [1] script. When you are in Windows Explorer it
; allows you to press Alt+N and type a filename, and that file is created
; in the current directory and opened in the appropriate editor (usually
; [gVim](http://www.vim.org/) in my case, but it will use whatever program is
; associated with the file in Windows Explorer).
; This is much easier than the alternative that I have been using until now:
; Right click > New > Text file, delete default filename and extension (which
; isn't highlighted in Windows 7), type the filename, press enter twice.
; (Particularly for creating dot files like ".htaccess".)
@nderkach
nderkach / read_mitmproxy_dumpfile.py
Last active April 18, 2023 21:36
Read a mitmproxy dump file and generate a curl command
#!/usr/bin/env python
#
# Simple script showing how to read a mitmproxy dump file
#
### UPD: this feature is now avaiable in mitmproxy: https://github.com/mitmproxy/mitmproxy/pull/619
from libmproxy import flow
import json, sys
@brettz9
brettz9 / styles.less
Last active April 26, 2023 21:06
Atom stylesheet
/*
* Your Stylesheet
*
* This stylesheet is loaded when Atom starts up and is reloaded automatically
* when it is changed and saved.
*
* Add your own CSS or Less to fully customize Atom.
* If you are unfamiliar with Less, you can read more about it here:
* http://lesscss.org
*/
@KhepryQuixote
KhepryQuixote / PyTorStemPrivoxy.md
Last active September 9, 2023 20:36
Python script to connect to Tor via Stem and Privoxy, requesting a new connection (hence a new IP as well) as desired.

Crawling Anonymously with Tor in Python

adapted from the article "Crawling anonymously with Tor in Python" by S. Acharya, Nov 2, 2013.

The most common use-case is to be able to hide one's identity using TOR or being able to change identities programmatically, for example when you are crawling a website like Google and you don’t want to be rate-limited or blocked via IP address.

Tor

Install Tor.

@WillemRB
WillemRB / ProcessingAnimation
Last active December 15, 2023 01:28
PowerShell function to create a processing animation for long running scriptblocks.
function ProcessingAnimation($scriptBlock) {
$cursorTop = [Console]::CursorTop
try {
[Console]::CursorVisible = $false
$counter = 0
$frames = '|', '/', '-', '\'
$jobName = Start-Job -ScriptBlock $scriptBlock
@airstrike
airstrike / mute-mic.ahk
Last active December 29, 2023 22:08
AutoHotkey | Toggle microphone hotkey script (Windows+U)
;
; AutoHotkey Version: v1.1.22.06
; Language: English
; Platform: Windows 10
; Author: Andy Terra <github.com/airstrike>
;
; Script Function:
; Toggle Microphone Mute -- assumes it is located at WAVE:1, device #2
; Use the SoundCardAnalysis script to figure out where your mic is
; https://www.autohotkey.com/docs/commands/SoundSet.htm#Ex
@coinsandsteeldev
coinsandsteeldev / dialog.html
Last active February 7, 2024 11:23 — forked from arthurattwell/dialog.html
Google Sheets script to allow multi-select in cells with data-validation (adapted from https://www.youtube.com/watch?v=dm4z9l26O0I)
<!DOCTYPE html>
<html>
<head>
<script>
var data
var formId = 'form'
function drawForm() {
if (!data) return
var outputEl = document.getElementById(formId);
@wontoncc
wontoncc / balloontip.py
Last active March 1, 2024 15:47
Balloon tip module, Python, using win32gui.
# -- coding: utf-8 --
from win32api import *
from win32gui import *
import win32con
import sys, os
import struct
import time
class WindowsBalloonTip: