Skip to content

Instantly share code, notes, and snippets.

@jgraber
jgraber / get_twitter_bookmarks.py
Created January 12, 2022 22:47 — forked from divyajyotiuk/get_twitter_bookmarks.py
Python code to get text and link of the bookmarked tweets and save in markdown
import json
import glob
all_bookmarks = []
md_file = open("bookmarks.md", "w+") # saving in markdown file, if no file exists using '+' creates one
files = [file for file in glob.glob("JSONBookmarks/*")] # using glob to read all files from the folder
for file_name in files:
print(file_name)
with open(file_name) as bk:
@jgraber
jgraber / gist:02a020aae576d7b235c62d4c104da551
Created February 22, 2019 12:47 — forked from mtigas/gist:952344
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.

Using self-signed certificate.

Create a Certificate Authority root (which represents this server)

Organization & Common Name: Some human identifier for this server CA.

openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
# ...
# standard rails stuff here
# ...
Rake::TestTask.new([:test, :lockdown]) do |t|
t.test_files = FileList[
'test/functional/lockdown_test.rb'
]
end