Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am gerey on github.
* I am gcash (https://keybase.io/gcash) on keybase.
* I have a public key ASBefSMPn3PmxVd7xFqOv1IXdL4QeONizzFHsj2vVNHJ5wo
To claim this, I am signing this object:
@GERey
GERey / reset
Created December 6, 2018 21:38
User Reset Script REPL ONLY
(require '[circle.util.thread :refer (io-pmap)])
(require '[circle.http.authentication.login :refer (logout)])
(def all-users (doall (circle.model.user/all :only [:_id])))
(doall (io-pmap #(logout %) all-users))
@GERey
GERey / provision-services-ubuntu-xenial.sh
Created September 13, 2018 04:54
Ubuntu 16.04 Xenial Services Box
#!/usr/bin/env bash
set -exu
REPLICATED_VERSION="2.10.3"
DOCKER_VERSION="17.03.2"
guess_private_ip(){
/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'
}
@GERey
GERey / ubuntu-xenial-nomad-provision.sh
Created September 13, 2018 04:51
Ubuntu 16.04 Provisioning
#! /bin/sh
set -exu
export http_proxy="${http_proxy}"
export https_proxy="${https_proxy}"
export no_proxy="${no_proxy}"
echo "-------------------------------------------"
echo " Performing System Updates"
#!/usr/bin/env bash
set -exu
REPLICATED_VERSION="2.10.3"
DOCKER_VERSION="17.03.2"
guess_private_ip(){
/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'
}

Keybase proof

I hereby claim:

  • I am gerey on github.
  • I am cci_gmoney (https://keybase.io/cci_gmoney) on keybase.
  • I have a public key ASAsgvbj1G-PJ70InxJqgKdz5lhS1LkJrJQnkh9hBSTL6Ao

To claim this, I am signing this object:

@GERey
GERey / export v2
Created September 30, 2015 18:36
Export V2
#Export V2
Defines how the future iterated export handles what gets exported.
##Endpoints
Endpoints are the same as export v1.
` POST /management/orgs/<org_name>/apps/<app_name>/collection/<collection_name>/export `
` POST /management/orgs/<org_name>/apps/<app_name>/export `
@Override
public void delete( EntityRef entityRef ) throws Exception {
//TODO: since we want the user to mark it and we sweep it later. It should be marked by the graph manager here.
deleteAsync( entityRef ).toBlocking().lastOrDefault( null );
//delete from our UUID index
MapManager mm = getMapManagerForTypes();
mm.delete( entityRef.getUuid().toString() );
}
@GERey
GERey / IndexServiceImpl.java
Created May 5, 2015 21:36
deleteIndexEdge
final Observable<IndexOperationMessage> batches = Observable.just( edge ).map(
observableEdge -> generateScopeFromSource( edge ) ).flatMap( indexEdge -> {
final ApplicationEntityIndex ei = entityIndexFactory.createApplicationEntityIndex( applicationScope );
//TODO: make method to keep looping through elasticsearch until there are no more indexs to batchup
CandidateResults crs = ei.search( indexEdge, SearchTypes.fromTypes( edge.getType() ), "select *", 10, 0 );
final EntityIndexBatch batch = ei.createBatch();
@GERey
GERey / UserResource.java
Created November 3, 2014 21:07
Password reset
@PUT
@Path( "password" )
public JSONWithPadding setUserPasswordPut( @Context UriInfo ui, Map<String, Object> json,
@QueryParam( "callback" ) @DefaultValue( "callback" ) String callback )
throws Exception {
if ( json == null ) {
return null;
}