Skip to content

Instantly share code, notes, and snippets.

rlam3

Block or report user

Report or block rlam3

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
View .swift
let endpoint = Endpoint<ApiRouter>(
URL: target.baseURL.URLByAppendingPathComponent(target.path).absoluteString,
sampleResponseClosure: EndpointSampleResponse.NetworkResponse(200, NSData()), /// ERROR HERE .SUCCESS does not exists
method: target.method,
parameters: target.parameters,
parameterEncoding: self.parameterEncoding(target),
httpHeaderFields: [:]
)
@rlam3
rlam3 / ElasticSearch.sh
Created Apr 12, 2016 — forked from ricardo-rossi/ElasticSearch.sh
Installing ElasticSearch on Ubuntu 14.04
View ElasticSearch.sh
#!/bin/bash
### USAGE
###
### ./ElasticSearch.sh 1.7 will install Elasticsearch 1.7
### ./ElasticSearch.sh will fail because no version was specified (exit code 1)
###
### CLI options Contributed by @janpieper
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch
View zero_downtime_reindexing.py
from datetime import datetime
from elasticsearch_dsl import (
DocType,
String,
Integer,
Float
)
def _suffix():
View gist:c4f2b80cc5d768c1a1e8
import os
fullpath = os.path.join(os.sys.path[0],'path/to/file/or/folder'
# size of folder or file
# reminder: folder size does not include content within folder
os.stat(fullpath).st_size
You can’t perform that action at this time.