Skip to content

Instantly share code, notes, and snippets.

@eriwen
eriwen / pretty_thunderbird_labels.css
Created Dec 29, 2010
userChrome.css snippet for Thunderbird to have pretty labels
View pretty_thunderbird_labels.css
/* Default Important Label */
treechildren::-moz-tree-cell(lc-FF0000) {
border-bottom: 1px solid #FF0000 !important; background-color: #FFCCCC !important;
}
treechildren::-moz-tree-cell-text(lc-FF0000) {
color: #000000 !important;
}
treechildren::-moz-tree-cell(lc-FF0000, selected) {
background-color: #FF0000 !important;
}
@BrockA
BrockA / waitForKeyElements.js
Created May 7, 2012
A utility function, for Greasemonkey scripts, that detects and handles AJAXed content.
View waitForKeyElements.js
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts,
that detects and handles AJAXed content.
Usage example:
waitForKeyElements (
"div.comments"
, commentCallbackFunction
);
@xiaoganghan
xiaoganghan / mynote.xml
Created Jul 27, 2012
Parsing Evernote export file (.enex) using Python
View mynote.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE en-export SYSTEM "http://xml.evernote.com/pub/evernote-export2.dtd">
<en-export export-date="20120727T073610Z" application="Evernote" version="Evernote Mac 3.0.5 (209942)">
<note><title>Vim Tips</title><content><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd">
<en-note style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
yank for copy, delete for cut, put for parse
<div><br/></div>
<div>Move in context, not position</div>
<div>/ search forward</div>
@Dianoga
Dianoga / nest.devicetype.groovy
Last active Sep 16, 2018
Nest Device Type for SmartThings
View nest.devicetype.groovy
/**
* Nest Direct
*
* Author: dianoga7@3dgo.net
* Date: 2013-07-18
* Code: https://gist.github.com/Dianoga/6055918
*
* INSTALLATION
* =========================================
* 1) Create a new device type (https://graph.api.smartthings.com/ide/devices)
@martzcodes
martzcodes / smartthings_lan_discovery.groovy
Created Feb 5, 2014
smartthings_lan_discovery.groovy
View smartthings_lan_discovery.groovy
/**
* LANtest App
*
* Author: m@mattmartz.com
* Date: 2014-02-02
*/
preferences {
section("Local IP address...") {
input "ip", "text"
}
View nest.devicetype.groovy
/**
* ps_Nest Thermostat
*
* Copyright 2014 Patrick Stuart
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@ddz
ddz / ios_lockdown_diag_services.md
Last active Aug 25, 2021
iOS Lockdown Diagnostic Services
View ios_lockdown_diag_services.md

TL;DR

  • Pairing an iOS device to a host (computer running iTunes) gives that host significant access to data on the iOS device and requires connecting the unlocked iOS device to a host over USB
  • Once paired, that host (or another host that has stolen its pairing record) can access significant amounts of user personal data from the iOS device over USB and Wi-Fi through the com.apple.mobile.file_relay and com.apple.mobile.house_arrest lockdown services
  • These services will not return user data files that are encrypted and locked by iOS Data Protection but the files returned by file_relay are not protected by iOS Data Protection and do include significant amounts of personal user data that would otherwise be encrypted in iTunes encrypted backups ("Encrypt Backup" is enabled)
  • The com.apple.mobile.file_relay service is not used or referenced by any public Apple software so its intended client software is unknown outside of Apple
  • Apple released a [Knowledge Base article](https://support.apple.co
View appledefaultprefs
#!/bin/bash
#* Default preferences.
#+ Modifies /System/Library/User Template
#+ Note : I copy com.apple.dock.plist and com.apple.sidebarlists.plist as they are too messy to write.
for USER_TEMPLATE in `sudo ls /System/Library/User\ Template`
do
if [ -r "/System/Library/User Template/${USER_TEMPLATE}/Library/Preferences" ]; then
/bin/echo "Modifying /System/Library/User Template/${USER_TEMPLATE}/Library/Preferences"
# com.apple.ATS.plist