Skip to content

Instantly share code, notes, and snippets.

View wndxlori's full-sized avatar

Lori M Olson wndxlori

View GitHub Profile
@mattt
mattt / uiappearance-selector.md
Last active June 4, 2024 13:28
A list of methods and properties conforming to `UIAppearance` as of iOS 12 Beta 3

Generate the list yourself:

$ cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS*.sdk/System/Library/Frameworks/UIKit.framework/Headers
$ grep UI_APPEARANCE_SELECTOR ./*     | \
  sed 's/NS_AVAILABLE_IOS(.*)//g'     | \
  sed 's/NS_DEPRECATED_IOS(.*)//g'    | \
  sed 's/API_AVAILABLE(.*)//g'        | \
  sed 's/API_UNAVAILABLE(.*)//g'      | \
 sed 's/UI_APPEARANCE_SELECTOR//g' | \
@willurd
willurd / web-servers.md
Last active July 12, 2024 11:21
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@bensheldon
bensheldon / distribution.rake
Created June 29, 2013 16:23
RubyMotion rake tasks for deployng adhoc and release builds while pushing dsyms to Crittercism and (for adhoc) pushing builds to TestFlight without using any SDKs.
def build_path
"build/iPhoneOS-6.0-Release/"
end
def ipa_name
'"Today\'s Shirts.ipa"'
end
def dsym_name
'"Today\'s Shirts.dSYM"'
@madrobby
madrobby / gist:9628514
Last active November 18, 2020 13:00
Ansible actions to install a PostgreSQL 9.3 database server on Ubuntu 12.04
- name: Add PostgreSQL repository
apt_repository: repo='deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main' state=present
sudo: yes
- name: Add PostgreSQL repository key
apt_key: url=https://www.postgresql.org/media/keys/ACCC4CF8.asc state=present
sudo: yes
- name: Update apt cache
apt: update_cache=yes
@jacklynrose
jacklynrose / openstruct.rb
Created May 23, 2014 09:55
Half implementation of OpenStruct
class OpenStruct < BasicObject
def initialize(hash)
@struct = ::Struct.new(*hash.keys.map { |k| k.to_sym })
@struct = @struct.new(*hash.values)
end
def ==(other)
to_h == other.to_h
end
@orta
orta / _SQL.sql
Last active November 8, 2016 12:12
Top 300 Pods by Application Integrations
SELECT pods.name, stats_metrics.download_total, stats_metrics.download_week, stats_metrics.app_total, stats_metrics.app_week FROM stats_metrics JOIN pods ON stats_metrics.pod_id = pods.id ORDER BY app_total DESC LIMIT 300;
@jbender
jbender / simulators.rb
Created February 23, 2016 19:35
RubyMotion simulate all OS/device combos
{
:iphone_4 => 'iPhone 4s',
:iphone_5 => 'iPhone 5',
:iphone_6 => 'iPhone 6',
:iphone_6_plus => 'iPhone 6 Plus',
:ipad => 'iPad Retina',
:ipad_air => 'iPad Air'
}.each do |rake_task, device|
default_task = "bundle exec rake device_name=\"#{device}\""
@nternetinspired
nternetinspired / output-articles-by-collection.liquid
Last active April 25, 2021 02:17
Loop through Jekyll collections and output their content as sections and articles
{% comment %}
Loops though every collection you defined in _config.yml and grabs the pages they contain; outputting title and full text with good basic html semantics.
Use page.excerpt instead of page.content to grab the first paragraph, blog list style. Markdownify is optional, depends how you authored content in your collections; I typically use Markdown.
{% endcomment % }
{% for collection in site.collections %}
{% assign name = collection.label %}
<section>
@jadonk
jadonk / README.md
Last active May 1, 2022 21:36
Installing mjpg-streamer
@dchersey
dchersey / pre-commit
Last active October 27, 2016 20:33
commit hook to detect presence of rubymotion logging statements
#!/bin/sh
# Redirect output to stderr.
exec 1>&2
# enable user input
exec < /dev/tty
consoleregexp='^[^#]*mp[^a-zA-Z0-9]'
# CHECK
if test $(git diff --cached | grep $consoleregexp | grep + | wc -l) != 0
then