Skip to content

Instantly share code, notes, and snippets.

@drewkerrigan
drewkerrigan / gist:2876196
Created June 5, 2012 16:51
Swift Usage Examples
Execute the following command and make a note of X-Auth-Token. You will need this token to use in all subsequent commands.
curl -v -H 'X-Storage-User: system:root' -H 'X-Storage-Pass: testpass' http://10.80.83.68:8077/auth/v1.0
In the following command examples we are using 'AUTH_tk65840af9f6f74d1aaefac978cb8f0899' as the X-Auth-Token. Replace this with the appropriate token you obtained in the above step.
To create a container:
curl -X PUT -H 'X-Auth-Token: AUTH_tk65840af9f6f74d1aaefac978cb8f0899' http://10.80.83.68:8077/v1/AUTH_system/mycontainer
To list all containers in current account:
#Minecraft server properties
allow-cheats=true
allow-flight=true
allow-nether=true
broadcast-console-to-ops=true
broadcast-rcon-to-ops=true
difficulty=easy
enable-command-block=false
enable-jmx-monitoring=false
enable-query=false
@drewkerrigan
drewkerrigan / add_data.sh
Created April 2, 2015 03:56
Geospatial query example with Solr
curl -XPOST http://localhost:8098/types/location_type/buckets/people/datatypes/person1 \
-H "Content-Type: application/json" \
-d '
{
"update": { "username_register": "user1", "city_register": "Denver", "state_register": "NY", "position_register": "42.27,-74.53" }
}'
curl -XPOST http://localhost:8098/types/location_type/buckets/people/datatypes/person2 \
-H "Content-Type: application/json" \
-d '
@drewkerrigan
drewkerrigan / example-output.txt
Created August 5, 2022 19:05
Math Problem Generator
1 x 12 = _____ | 1 x 9 = _____
2 x 4 = _____ | 2 x 5 = _____
3 x 11 = _____ | 3 x 7 = _____
4 x 8 = _____ | 4 x 5 = _____
5 x 7 = _____ | 5 x 12 = _____
6 x 3 = _____ | 6 x 11 = _____
7 x 10 = _____ | 7 x 3 = _____
8 x 8 = _____ | 8 x 11 = _____
9 x 10 = _____ | 9 x 9 = _____
10 x 11 = _____ | 10 x 11 = _____
{
"riak": {
"framework-name": "riak",
"hostname": "riak.marathon.mesos",
"marathon": "m1.dcos:8080",
"master": "m1.dcos:5050",
"zk": "m1.dcos:2181",
"user": "root",
"role": "riak",
"auth-principal": "riak",
@drewkerrigan
drewkerrigan / jq_filter_formatting.md
Created October 11, 2021 21:36
Filtering and Formating JSON with JQ

Create test.json:

cat << 'EOF' > ./test.json
[
  {
    "name": "First1 Last",
    "email": "first1@company.io",
    "state": "A"
 },
@drewkerrigan
drewkerrigan / README.md
Last active June 6, 2021 05:41
Setting open files limit in OSX 10.11.3

Download this gist, and then run:

chmod 755 open_files_limit_mac.sh
./open_files_limit_mac.sh

Restart the system, and then run:

@drewkerrigan
drewkerrigan / docker_install_notes.md
Last active December 10, 2020 06:17
Some notes on my experience installing Docker on OS X 10.9.2
@drewkerrigan
drewkerrigan / README.md
Created November 21, 2018 16:54
Pandoc, Mactex, Markdown to PDF

I've had to install and configure these things a few times, and I always forget how to do it, so here it is for posterity:

@drewkerrigan
drewkerrigan / YOKOZUNA.md
Last active July 12, 2019 21:01
Yokozuna Setup

Create a schema based on the default one

https://github.com/basho/yokozuna/blob/develop/priv/default_schema.xml

Upload your schema

curl -XPUT -H 'Content-Type: application/xml'  http://localhost:8098/search/schema/drew_schema --data-binary @"my_schema.xml"