Skip to content

Instantly share code, notes, and snippets.

View rlam3's full-sized avatar

rlam3

View GitHub Profile
@AvdLee
AvdLee / ALSwiftyBeaverCLLogger
Last active April 19, 2017 03:04
CocoaLumberjack logger for SwiftyBeaver
//
// ALSwiftyBeaverCLLogger.swift
//
// Created by Antoine van der Lee on 09/05/16.
// Copyright © 2016 Antoine van der Lee. All rights reserved.
//
import Foundation
import CocoaLumberjack
import SwiftyBeaver
@jpgiago
jpgiago / gulpfile.js
Last active September 22, 2017 01:23
Gulp.js for Stylus (lost, axis, rupture w/ postcss)
var gulp = require('gulp'),
plumber = require('gulp-plumber'),
gutil = require('gulp-util'),
autoprefixer = require('autoprefixer'),
sourcemaps = require('gulp-sourcemaps'),
postcss = require('gulp-postcss'),
poststylus = require('poststylus'),
stylus = require('gulp-stylus'),
axis = require('axis'),
rupture = require('rupture'),
@mars
mars / install.md
Last active December 19, 2019 22:26 — forked from Micka33/install.md
Cassandra on Mac OS X

Installing Cassandra on Mac OS X

Install Homebrew

Homebrew is a great little package manager for OS X. If you haven't already, installing it is pretty easy:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
@joepie91
joepie91 / vpn.md
Last active April 20, 2024 21:15
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
@mbalex99
mbalex99 / gist:8802db1695f20c520ca0
Last active May 22, 2022 11:58
Alamofire and RxSwift
let rx_request = Observable<Value>.create { (observer) -> Disposable in
let requestReference = Alamofire.request(.POST, url, parameters: payload)
.responseJSON(completionHandler: { (response) in
if let value = response.result.value {
observer.onNext(value)
observer.onCompleted()
}else if let error = response.result.error {
observer.onError(error)
}
})
@ikeikeikeike
ikeikeikeike / zero_downtime_reindexing.py
Created March 30, 2015 04:15
Elasticsearch Zero Downtime Reindexing using elasticsearch-dsl-py ref: https://www.elastic.co/blog/changing-mapping-with-zero-downtime
from datetime import datetime
from elasticsearch_dsl import (
DocType,
String,
Integer,
Float
)
def _suffix():
@ebuildy
ebuildy / gist:5d4ad0998848eaefdad8
Last active November 7, 2018 19:14
Setup sentry logger on a fresh Ubuntu server
sudo apt-get update
sudo apt-get install python-virtualenv
sudo apt-get install python-dev
sudo apt-get install postgresql
sudo apt-get install postgresql-server-dev-9.3
sudo apt-get install redis-server
sudo -u postgres createuser -s sentry
sudo -u postgres psql -c "alter user sentry with password 'sentry';"
@scabbiaza
scabbiaza / README.md
Created September 22, 2014 18:29
Flask with infinity scroll navigation

Flask with infinity scroll navigation

Using: Flask, SQLAlchemy, Infinite-scroll

@ricardo-rossi
ricardo-rossi / ElasticSearch.sh
Last active December 1, 2023 04:55
Installing ElasticSearch on Ubuntu 14.04
#!/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