Skip to content

Instantly share code, notes, and snippets.

View andykuszyk's full-sized avatar

andykuszyk

  • Deliveroo
  • Southampton, UK
View GitHub Profile
@andykuszyk
andykuszyk / launch-chrome-app.sh
Created November 26, 2019 10:28
Launch Chrome in app mode using a URL from the clipboard
#!/bin/bash
google-chrome --app="$(xclip -selection c -o)"
@andykuszyk
andykuszyk / ssh access with keys.md
Created July 28, 2018 15:24
ssh access with keys
ssh-keygen
ssh-copy-id username@remote_host
@andykuszyk
andykuszyk / save-git-credentials.sh
Created March 16, 2018 14:09
Save git credentials
git config credential.helper store
@andykuszyk
andykuszyk / .vimrc
Last active May 29, 2019 08:47
vimrc
set tabstop=4 shiftwidth=4 expandtab
set number
autocmd Filetype go setlocal ts=4 sw=4 sts=0 noexpandtab
set nocompatible
filetype off
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
import falcon
import waitress
import json
class HelloWorldResource:
def on_post(self, req, resp):
content = req.stream.read().decode()
if content == 'spam':
resp.body = json.dumps('eggs')
@andykuszyk
andykuszyk / Setting up Spark on Ubuntu in clustered environment.md
Last active December 5, 2018 19:04
Setting up Spark on Ubuntu in clustered environment

Setting up Spark on Ubuntu in clustered environment

Getting Spark and setting up user

sudo adduser spark
su spark
cd
wget http://apache.mirror.anlx.net/spark/spark-2.2.0/spark-2.2.0-bin-hadoop2.7.tgz
tar -xvf spark~
rm *.tgz
import argparse
import datetime
import time
def date(arg):
return datetime.date.fromtimestamp(time.mktime(time.strptime(arg, '%d/%m/%Y')))
if __name__ == '__main__':
@andykuszyk
andykuszyk / Travis PyPi release.md
Created September 7, 2017 10:29
Travis PyPi release

Encrypt your PyPi password using:

echo -n "password1" | travis encrypt --add deploy.password

in your root dir.

.travis.yml

language: python
python:
@andykuszyk
andykuszyk / PIP release.md
Last active August 16, 2017 08:40
PIP release
  • Put setup files in root of repo
  • Put .pypirc in home folder
  • Run python setup.py sdist in repo dir
  • Run twine upload dist/* in repo dir
@andykuszyk
andykuszyk / Setting up Cassandra for remote access.md
Last active October 31, 2023 07:48
Setting up Cassandra for remote access

Make these changes in the cassandra.yaml config file:

start_rpc: true

rpc_address: 0.0.0.0

broadcast_rpc_address: [node-ip]

listen_address: [node-ip]