Skip to content

Instantly share code, notes, and snippets.

View rsanders's full-sized avatar

Robert Sanders rsanders

View GitHub Profile
@rsanders
rsanders / restricted-psp.yaml
Created February 16, 2018 01:28 — forked from tallclair/restricted-psp.yaml
Restricted PodSecurityPolicy
apiVersion: extensions/v1beta1
kind: PodSecurityPolicy
metadata:
name: restricted
annotations:
seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'docker/default'
apparmor.security.beta.kubernetes.io/allowedProfileNames: 'runtime/default'
seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default'
apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default'
spec:
@rsanders
rsanders / es_pri_allocate_unassigned.md
Created December 14, 2017 20:35 — forked from ianblenke/es_pri_allocate_unassigned.md
elasticsearch trying to allocate a primary shard which is disabled

Allow routing allocations:

curl -XPUT localhost:9200/_cluster/settings -d '{
                "transient" : {
                    "cluster.routing.allocation.enable" : "all"
                }
        }'
@rsanders
rsanders / 0_reuse_code.js
Created April 10, 2016 19:29
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@rsanders
rsanders / keybase.md
Created May 14, 2014 21:26
keybase gist

Keybase proof

I hereby claim:

  • I am rsanders on github.
  • I am rsanders (https://keybase.io/rsanders) on keybase.
  • I have a public key whose fingerprint is A51B 818A C7DB 5F2A C8CF FC63 193F DA4E AE3C FA9A

To claim this, I am signing this object:

# Rake Quick Reference
# by Greg Houston
# http://ghouston.blogspot.com/2008/07/rake-quick-reference.html
# -----------------------------------------------------------------------------
# Running Rake
# -----------------------------------------------------------------------------
# running rake from the command-line:
# rake --help
Scenario: User attempts to redeem a valid PIN, but there is a network issue
Given an activated user logged in as 'testuser'
And an active PIN code
And the connection to CardService fails
When she redeems the PIN code
Then she should be at the 'redemption/error.html.erb' page
And she should see a notice message 'Temporary problem with PIN redemption'
And the connection to CardService recovers
Scenario: User redeems a valid (active) PIN
A.7. Taking Camera Photos
The Photo Library framework is a proprietary framework providing common methods for the iPhone's Camera application. One useful feature buried inside this framework is the CameraController class, which is capable of snapping 16,001,200 photos in JPEG format.
This is very cool, while also very creepy at the same time. The camera controller itself makes no attempt to notify the user that a photo is being taken, nor is there any indication on the iPhone's display. This creates the possibility for real spyware (that is, voyeurware) to easily be written and installed on a user's iPhone without her knowledge.
A.7.1. Installing CameraController Prototypes
The Photo Library framework is not included in the prototype collection for version 0.30 of the tool chain, so you'll need to dump it directly from the iPhone to begin using the camera controller. The CameraController.h prototype file can be generated using Steve Nygard's class-dump tool, available at http://www.codethecode.com/pro