Skip to content

Instantly share code, notes, and snippets.

Noam Tamim noamtm

Block or report user

Report or block noamtm

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@noamtm
noamtm / links.md
Last active Aug 29, 2015
Helpful articles and links
View links.md
@noamtm
noamtm / build-dist.sh
Created Feb 1, 2015
iOS: Re-sign an app for distribution
View build-dist.sh
# This is not a ready-to-run script. It just shows the relevant command-line calls.
XC_WORKSPACE=path/to/MyApp.xcworkspace
XC_SCHEME=MyApp
XC_CONFIG=Release
ARCHIVE_PATH=dest/path/to/MyApp.xcarchive
EXPORT_PATH=dest/path/to/MyApp.ipa
DIST_PROFILE=NameOfDistributionProfile
# Build and archive. This can be done by regular developers, using their developer key/profile.
@noamtm
noamtm / parse_ipa.py
Last active Aug 10, 2017
Python: Parse Info.plist from IPA on OSX
View parse_ipa.py
#!/usr/bin/env python
from Foundation import NSData, NSPropertyListSerialization
import fnmatch
import sys
from zipfile import ZipFile
# TODO: Add error checking.
def parse_plist(info_plist_string):
@noamtm
noamtm / qr.html
Created Jan 19, 2015
HTML/JS QR Generator. See inside.
View qr.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--
Usage: put text as the query string.
http://path/to/qr.html?text-to-encode
Based on https://github.com/davidshimjs/qrcodejs (and embeds it).
-->
<head>
<title>Cross-Browser QRCode generator for Javascript</title>
@noamtm
noamtm / dropboxshare.py
Created Dec 22, 2014
Dropbox upload and share. Quick and dirty, no auth (assumes existing access token). Only tested with an app that can only access its own files, in which case the target folder is relative to the app root folder.
View dropboxshare.py
#!/usr/bin/env python
# usage:
# ./dropboxshare.py TARGET_FOLDER FILES ...
# Upload all files to the same folder.
# Inside the folder, files are given the same name as their origin.
# Prints a list of URLs, one on each line.
import dropbox
from sys import argv
@noamtm
noamtm / echoplus.js
Created Aug 31, 2014
node.js echo server
View echoplus.js
/*
Node.js echo server
Starts an http server on port 8000. The server responds with:
- request headers as json
- 3 newline characters ('\n\n\n')
- request body (piped)
It does not attempt to "understand" the request in any way.
I use it for debugging clients, mostly POSTs.
@noamtm
noamtm / attrdict.py
Last active May 29, 2018
Python: read-only access to dictionary keys as attributes
View attrdict.py
# There are other solutions across the interwebs. This is one that avoids complexities
# because it's read-only (useful when you just want to read json data, for example).
# It also makes it possible to read nested dictionaries in the same way.
# Based on ideas from http://code.activestate.com/recipes/473786-dictionary-with-attribute-style-access/
class attrdict (dict):
'''
Read-only access to dictionary keys as attributes.
>>> d=attrdict({"a":1, "b":2, "c":{"a":1, "b":2, "c":{"a":1, "b":2}}})
>>> d.a
@noamtm
noamtm / OrderedYAML.py
Created Nov 7, 2012 — forked from enaeseth/yaml_ordered_dict.py
Load YAML mappings as ordered dictionaries
View OrderedYAML.py
import yaml
import yaml.constructor
def load(data):
try:
# included in standard lib from Python 2.7
from collections import OrderedDict
except ImportError:
# try importing the backported drop-in replacement
You can’t perform that action at this time.