Skip to content

Instantly share code, notes, and snippets.

View dlenski's full-sized avatar

Dan Lenski dlenski

View GitHub Profile
// ==UserScript==
// @name @chaoticvibing Twitter Blue red ticks - twitter.com
// @namespace Violentmonkey Scripts
// @match *://*.twitter.com/*
// @grant none
// @version 1.5.2
// @author @chaoticvibing - GH @busybox11, modified by @arturo182
// @description 11/9/2022, 11:45:28 PM
// @updateURL https://gist.githubusercontent.com/arturo182/85251cbc370a12d9de6766dd44b88d5c/raw/twitterblue-red.user.js
// @downloadURL https://gist.githubusercontent.com/arturo182/85251cbc370a12d9de6766dd44b88d5c/raw/twitterblue-red.user.js
@dlenski
dlenski / formatted_link.js
Created January 30, 2020 03:30
Bookmarklet to copy current page title as a rich-text formatted link
@dlenski
dlenski / fakeserver.py
Last active May 10, 2022 21:17
Fake server for RSA SecurID token generation (see https://github.com/dlenski/rsa_ct_kip#fake-server)
#!/usr/bin/env python3
# Needs: Python 3.5+, Flask, PyCryptoDome
# server.pem, rsapubkey.pem + rsaprivkey.pem (1024-bit) in the current directory
#
# What it does:
# Pretends to be the "CT-KIP" web service (https://tools.ietf.org/html/rfc3948) that
# RSA SecurID Token for Windows v5.0.x talks to to set up a new token, using an
# authentication code.
#
@dlenski
dlenski / bagcerts
Created July 17, 2018 03:56
Add "bag attributes" to a certificate chain
#!/bin/bash
#
# This script takes one or more x509 certificates in .PEM format (from
# stdin or files listed on command line) and adds helpful "bag
# attributes" before each certificate. This makes it easier for
# humans to identify the contents of the bundle.
#
# Requires (g)awk and openssl's x509 command line utility.
#
# Output fields included can be specified via openssl-x509 options:
@stefancocora
stefancocora / vpn-openconnect-connect-to-cisco-anyconnect.md
Created September 25, 2017 08:48
Split tunneling with openconnect - A guide on how to use openconnect to establish a vpn connection to an enterprise cisco anyconnect vpn endpoint with client side routing.

Introduction

The purpose of this short howto is to show you how to:

  • use openconnect [1] to connect to an enterprise cisco anyconnect endpoint
  • whilst minimizing the amount of traffic that your route through the vpn connection

Usually VPN administrators will puth the default route to the users, so that all user traffic is routed through the vpn connection. This is to address the various security concerns around compromised user computers bridging external internet traffic into the secure VPN network.

While the VPN administrator can push routes to the clients, the client can ignore these default routes and establish client side routing so that only the required A.B.C.D/E network is routed through the VPN. All other traffic will still use the clients default route and default outbound internet connection.

#!/usr/bin/env python
#encoding:utf8
#===============================================================================
#
# FILE: simg2img.py
#
# USAGE: ./simg2img.py system.img
#
# DESCRIPTION:
#
@htp
htp / curl-websocket.sh
Last active March 3, 2024 20:01
Test a WebSocket using curl.
curl --include \
--no-buffer \
--header "Connection: Upgrade" \
--header "Upgrade: websocket" \
--header "Host: example.com:80" \
--header "Origin: http://example.com:80" \
--header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \
--header "Sec-WebSocket-Version: 13" \
http://example.com:80/
@lukas-h
lukas-h / license-badges.md
Last active April 17, 2024 14:06
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)

moved to github --> https://github.com/bill-auger/git-branch-status/
@dschuetz
dschuetz / make_passbook.py
Created May 31, 2014 03:43
Simple hack to create Passbook .pkpass file
import sys, os.path, hashlib, re
import zipfile
import subprocess
from StringIO import StringIO
from io import BytesIO
#
# Passbook Hack
# David Schuetz
# 30 May 2014