Skip to content

Instantly share code, notes, and snippets.

View marcos1262's full-sized avatar

Marcos Paulo marcos1262

View GitHub Profile
phpenterprise / string-similarity-mysql.sql
Created June 25, 2019 15:21
String Similarity with MySQL
CREATE DEFINER=`root`@`localhost` FUNCTION `COMPARE_STRING`( s1 text, s2 text) RETURNS int(11)
DECLARE s1_len, s2_len, i, j, c, c_temp, cost INT;
DECLARE cv0, cv1 text;
SET s1_len = CHAR_LENGTH(s1), s2_len = CHAR_LENGTH(s2), cv1 = 0x00, j = 1, i = 1, c = 0;
IF s1 = s2 THEN
ratazzi / duplicate_xcode_project_target.rb
Last active December 22, 2022 14:09
Duplicate Xcode Project Target with Ruby
#!/usr/bin/env ruby
require 'rubygems'
require 'xcodeproj'
name = 'test_copy'
proj ='test.xcodeproj')
src_target = proj.targets.find { |item| item.to_s == 'test' }
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.

benvium /
Created May 1, 2012 15:14
This script installs a .mobileprovision file via bash (no GUI session needed)
# 2012 - Ben Clayton (benvium). Calvium Ltd
# Found at
# This script installs a .mobileprovision file without using Xcode. Unlike Xcode, it'll
# work over SSH.
# Requires Mac OS X (I'm using 10.7 and Xcode 4.3.2)