Skip to content

Instantly share code, notes, and snippets.

View mcdado's full-sized avatar
🏠
Working from home

David Gasperoni mcdado

🏠
Working from home
View GitHub Profile
@richarddas
richarddas / readinglisturls.py
Last active November 16, 2023 21:24 — forked from robmathers/readinglisturls.py
Prints out URLs of items in Safari’s Reading List
#!/usr/bin/env python3
import plistlib
from shutil import copy
import subprocess
import os
from tempfile import gettempdir
import sys
import atexit
BOOKMARKS_PLIST = '~/Library/Safari/Bookmarks.plist'
@kylehowells
kylehowells / FreeSpaceViewController.swift
Created May 4, 2022 23:24
UIViewController subclass to show both the Settings app displayed free space, and the real free space.
//
// FreeSpaceViewController.swift
// Free Space
//
// Created by Kyle Howells on 04/05/2022.
//
import UIKit
class FreeSpaceViewController: UIViewController {
@dylanmckay
dylanmckay / facebook-contact-info-summary.rb
Last active March 12, 2024 22:46
A Ruby script for collecting phone record statistics from a Facebook user data dump
#! /usr/bin/env ruby
# NOTE: Requires Ruby 2.1 or greater.
# This script can be used to parse and dump the information from
# the 'html/contact_info.htm' file in a Facebook user data ZIP download.
#
# It prints all cell phone call + SMS message + MMS records, plus a summary of each.
#
# It also dumps all of the records into CSV files inside a 'CSV' folder, that is created
@auipga
auipga / iperf3.service
Last active April 6, 2024 00:21 — forked from mmasaki/iperf.service
systemd service unit for iperf3
# /etc/systemd/system/iperf3.service
# User service: $HOME/.config/systemd/user/iperf3.service
[Unit]
Description=iperf3 server
After=syslog.target network.target auditd.service
[Service]
ExecStart=/usr/bin/iperf3 -s
@w00fz
w00fz / sphp.sh
Last active February 7, 2022 00:12
PHP switcher
#!/bin/bash
# Check if command was ran as root.
if [[ $(id -u) -eq 0 ]]; then
echo "The command \"sphp\" should not be executed as root or via sudo directly."
echo "When a service requires root access, you will be prompted for a password as needed."
exit 1
fi
# Usage
@bvanskiver
bvanskiver / shrew-soft-shortcut.bat
Last active March 14, 2023 07:25
Shrew Soft VPN client shortcut with saved credentials
rem http://www.shrew.net/
"C:\Program Files\ShrewSoft\VPN Client\ipsecc.exe" -r "VPN Profile Name" -u "Username" -p "Password" -a
{
"always_show_minimap_viewport": true,
"auto_indent": true,
"auto_match_enabled": true,
"bold_folder_labels": true,
"color_scheme": "Packages/Base16 Color Schemes/base16-default.dark.tmTheme",
"detect_indentation": false,
"draw_minimap_border": true,
"draw_white_space": "selection",
"ensure_newline_at_eof_on_save": true,
@adactio
adactio / Twig-critical-CSS-test.twig
Last active January 30, 2024 07:13
Twig template for inlining critical CSS on first visits.
{% set cssupdate = '20150309' %}
{% if _cookie.csscached == cssupdate %}
<link rel="stylesheet" href="/css/global-min.{{ cssupdate }}.css">
{% else %}
<style>
{% include 'global/critical.css' %}
</style>
<script>
(function (win, doc) {
'use strict';
@rmondello
rmondello / gist:b933231b1fcc83a7db0b
Last active April 5, 2024 07:10
Exporting (iCloud) Keychain and Safari credentials to a CSV file

Exporting (iCloud) Keychain and Safari credentials to a CSV file

Update (October 2021)

Exporting password + one-time code data from iCloud Keychain is now officially supported in macOS Monterey and Safari 15 (for Monterey, Big Sur, and Catalina). You can access it in the Password Manager’s “gear” icon (System Preferences > Passwords on Monterey, and Safari > Passwords everywhere else), or via the File > Export > Passwords... menu item). You shouldn't need to hack up your own exporter anymore.

Original, Obsolete Content (2014)

After my dad died, I wanted to be able to have access any of his online accounts going forward. My dad was a Safari user and used iCloud Keychain to sync his credentials across his devices. I don’t want to have to keep an OS X user account around just to access his accounts, so I wanted to export his credentials to a portable file.

@ttscoff
ttscoff / ReadingListCatcher.py
Created January 6, 2015 15:59
A script for exporting Safari Reading List items to Markdown files and Pinboard bookmarks
#!/usr/bin/python
# ReadingListCatcher
# - A script for exporting Safari Reading List items to Markdown and Pinboard
# Brett Terpstra 2015
# Uses code from <https://gist.github.com/robmathers/5995026>
# Requires Python pinboard lib for Pinboard.in import:
# `easy_install pinboard` or `pip install pinboard`
import plistlib
from shutil import copy
import subprocess