Skip to content

Instantly share code, notes, and snippets.

View Strajk's full-sized avatar
🐣
knock knock…

Pavel 'Strajk' Dolecek Strajk

🐣
knock knock…
View GitHub Profile
@inorganik
inorganik / thunderclap.js
Last active March 31, 2021 08:50
Smash Medium's clap button the max number of times (50) in 1 second
// smash Medium's clap button the max number of times
function simulateClick(node) {
var md = document.createEvent('MouseEvents');
md.initEvent('mousedown', true, false);
node.dispatchEvent(md);
var mu = document.createEvent('MouseEvents');
mu.initEvent('mouseup', true, false);
node.dispatchEvent(mu);
}
@martin-kokos
martin-kokos / Webexpo 2019.md
Last active June 24, 2021 15:37
Webexpo 2019
@adamcooke
adamcooke / cloudapp-export.rb
Created January 11, 2013 15:45
Export all your drops from CloudApp using this quick Ruby script
#!/usr/bin/env ruby
# A quick script to download all your files from CloudApp.
# To run this just run the script passing your e-mail & password
# to the script, for example:
#
# gem install cloudapp_api
# ruby cloudapp-export.rb adam@atechmedia.com mypassword
#
@bezhermoso
bezhermoso / notification-actions.applescript
Last active February 11, 2023 09:54
Handly AppleScripts to manage OS X notifications. (Use in Automator, bind to keyboard shortcuts via BetterTouchTool, etc.) Inspired by http://apple.stackexchange.com/a/155736
# Close all notifications
my closeNotifications()
on closeNotifications()
tell application "System Events" to tell process "Notification Center"
set theWindows to every window
repeat with i from 1 to number of items in theWindows
set this_item to item i of theWindows
try
click button 1 of this_item
@prasadsilva
prasadsilva / fresh-chrome-with-custom-tz.sh
Last active June 4, 2023 12:54 — forked from stuartsierra/fresh-chrome.sh
Launch new instances of Google Chrome on OS X with isolated cache, cookies, user config and custom Timezone
#!/usr/bin/env bash
# fresh-chrome
#
# Use this script on OS X to launch a new instance of Google Chrome
# with its own empty cache, cookies, and user configuration.
#
# The first time you run this script, it will launch a new Google
# Chrome instance with a permanent user-data directory, which you can
# customize below. Perform any initial setup you want to keep on every
@demonbane
demonbane / makeapp.sh
Created July 5, 2011 20:05
Create a Fluid-style app launcher for single-window Chrome instances on OSX
#!/bin/sh
echo "What should the Application be called (no spaces allowed e.g. GCal)?"
read inputline
name="$inputline"
echo "What is the url (e.g. https://www.google.com/calendar/render)?"
read inputline
url="$inputline"
@ValentaTomas
ValentaTomas / identity.ts
Last active September 21, 2023 08:29
Identify function
export function identity<T>(item: T) {
return item
}
@andphe
andphe / gist:3232343
Created August 2, 2012 01:41
Export your links from Safari reading list
/usr/bin/plutil -convert xml1 -o - ~/Library/Safari/Bookmarks.plist | grep -E -o '<string>http[s]{0,1}://.*</string>' | grep -v icloud | sed -E 's/<\/{0,1}string>//g'
@Dainius14
Dainius14 / og-developer-sound-pack.user.js
Last active March 5, 2024 08:54
OG Developer Sound Pack
// ==UserScript==
// @name OG Developer Sound Pack
// @namespace https://saldainius.lt
// @downloadUrl https://gist.github.com/Dainius14/8a9d5bfa06458a93a00b8d34111e7e4f/raw/og-developer-sound-pack.user.js
// @updateUrl https://gist.github.com/Dainius14/8a9d5bfa06458a93a00b8d34111e7e4f/raw/og-developer-sound-pack.user.js
// @website https://gist.github.com/Dainius14/8a9d5bfa06458a93a00b8d34111e7e4f/
// @version 1.5.2
// @description Plays sound when interacting with Bitbucket and Jira
// @author Dainius
// @match https://bitbucket.cid-dev.net/projects/*/repos/*/pull-requests/*
@tuansoibk
tuansoibk / cryptography-file-formats.md
Last active May 15, 2024 02:32
Cryptography material conversion and verification commands
  1. Introduction
  2. Standards
  3. Common combinations
  4. Conversion
  5. Verification/Inspection
  6. Tips for recognising

Introduction

It happens that there are many standards for storing cryptography materials (key, certificate, ...) and it isn't always obvious to know which standard is used by just looking at file name extension or file content. There are bunch of questions on stackoverflow asking about how to convert from PEM to PKCS#8 or PKCS#12, while many tried to answer the questions, those answers may not help because the correct answer depends on the content inside the PEM file. That is, a PEM file can contain many different things, such as an X509 certificate, a PKCS#1 or PKCS#8 private key. The worst-case scenario is that someone just store a non-PEM content in "something.pem" file.