Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

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

Michele Venturi dardo82

🏠
Working from home
View GitHub Profile
@c0ns0le
c0ns0le / MyFreeCams.sh
Created April 4, 2016 06:35 — forked from dardo82/MyFreeCams.sh
MyFreeCams on AppleTV
#!/bin/sh
ROOMID="$(curl -s $(echo "$1" | awk '{sub(/www/,"profiles"); sub(/#/,""); print $0}') | awk -F/ '/\/[0-9]{7,8}\//{print $6; exit}')"
if [ ${#ROOMID} -eq 7 ]; then
PREFIX="10"; else
PREFIX="1"
fi
MFCURL="http://video .myfreecams.com:1935/NxServer/mfc_$PREFIX$ROOMID.f4v_aac/playlist.m3u8"
for n in $(seq 340 492); do
@ruthenium
ruthenium / mkicns.sh
Created February 2, 2016 01:39 — forked from dardo82/mkicns.sh
Make ICNS from PNG
#!/bin/zsh
#mkicns.sh
FN=${1##*/}
DN=${1%/**}
BN=${FN%.*}
IS=iconset
ID=$BN.$IS
<!DOCTYPE html>
<html>
<body>
<h1>What were you expecting?</h1>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
@vinicius-stutz
vinicius-stutz / README.md
Created December 30, 2015 13:41
Google Chrome Favicons For Bookmarklets

Google Chrome Favicons For Bookmarklets

  1. Open the Bookmark Manager and export your bookmarks;
  2. Open the exported html file in your favorite editor and look for the bookmarklet you want a favicon applied to;
  3. Convert the 16x16 px (or greater) favicon you want to use into the BASE64 format (I used Base64 Image Encoder);
  4. Now you can add the favicon via adding the ICON="data:image/insert-your-base64-image-code-here" attribute in the link;
  5. Save the file and import it in the bookmark manager.

Done! If the favicon doesn’t show up, try clicking on the bookmarklet. Afterwards the changes should stick and you can delete the imported bookmarks folder. If you have sync activated the favicons on your bookmarklets will also show up on your other PC, Mac, smartphone etc.

@Jeremy-D-Miller
Jeremy-D-Miller / pbxz.c
Created October 28, 2015 06:42
PBXZ extractor that takes OS X .pkg directly - by PHPdev32 (posted by SJ_UnderWater)
//
// http://www.tonymacx86.com/general-help/135458-pbzx-stream-parser.html
//
// main.c
// pbzx
//
// Created by PHPdev32 on 6/20/14.
// Licensed under GPLv3, full text at http://www.gnu.org/licenses/gpl-3.0.txt
//
@djtech42
djtech42 / airportLink.sh
Created October 11, 2015 03:46
Create a Symbolic Link to Airport Command Line Tool in OS X
from Foundation import *
def readPlistFromData(data_obj):
# Reads binary and XML plists from a NSData object / python string / raw bytes
every_byte = ''.join([x for x in data_obj])
nsdata_obj = NSData.dataWithBytes_length_(every_byte, len(every_byte))
data, p_format, error = NSPropertyListSerialization.propertyListFromData_mutabilityOption_format_errorDescription_(nsdata_obj, \
NSPropertyListMutableContainersAndLeaves, None, None)
return data
@djtech42
djtech42 / revertosxrootless.sh
Last active May 1, 2018 18:11
Disable Rootless Feature (System Integrity Protection) in OS X El Capitan (Updated)
#!/bin/bash
#Beta 4 to Final Public Release (Must be run in Recovery Mode)
csrutil disable
#Beta 1-3
sudo nvram boot-args="rootless=0";sudo reboot
@josephg
josephg / 0dedict.py
Last active February 16, 2024 08:33
Apple dictionaries
# Thanks to commenters for providing the base of this much nicer implementation!
# Save and run with $ python 0dedict.py
# You may need to hunt down the dictionary files yourself and change the awful path string below.
# This works for me on MacOS 10.14 Mohave
from struct import unpack
from zlib import decompress
import re
filename = '/System/Library/Assets/com_apple_MobileAsset_DictionaryServices_dictionaryOSX/9f5862030e8f00af171924ebbc23ebfd6e91af78.asset/AssetData/Oxford Dictionary of English.dictionary/Contents/Resources/Body.data'
f = open(filename, 'rb')