Skip to content

Instantly share code, notes, and snippets.

@cequencer
cequencer / cheat-sheet-sbt.md
Created June 17, 2022 00:35 — forked from fran0x/cheat-sheet-sbt.md
Cheat Sheet SBT

Cheat Sheet SBT

To install sbt in OS X run brew install sbt (requires the almighty Homebrew installed first).

Basic commands are the following:

Command Action
Deletes all generated files (in the target directory) clean
Compiles the main sources (in src/main/scala and src/main/java directories) compile
@cequencer
cequencer / git.migrate
Created April 1, 2022 08:08 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@cequencer
cequencer / disable_vim_auto_visual_on_mouse.txt
Created March 9, 2020 14:28 — forked from u0d7i/disable_vim_auto_visual_on_mouse.txt
Disable vim automatic visual mode on mouse select
Disable vim automatic visual mode on mouse select
issue: :set mouse-=a
add to ~/.vimrc: set mouse-=a
my ~/.vimrc for preserving global defaults and only changing one option:
source $VIMRUNTIME/defaults.vim
set mouse-=a:
@cequencer
cequencer / csd-wrapper.sh
Created March 29, 2017 01:45 — forked from l0ki000/csd-wrapper.sh
Cisco Anyconnect CSD wrapper for OpenConnect (exhanced to autodownload and autoupdate hostscan)
#!/bin/bash
# Cisco Anyconnect CSD wrapper for OpenConnect
# Enter your vpn host here
CSD_HOSTNAME=
if [[ -z ${CSD_HOSTNAME} ]]
then
echo "Define CSD_HOSTNAME with vpn-host in script text. Exiting."
exit 1
fi
@cequencer
cequencer / Algorithm.py
Created November 23, 2016 01:36 — forked from marinhoarthur/Algorithm.py
A simple genetic algorithm written in Python fully based on an article by Lee Jacobson from his blog theprojectspot.com
from Population import Population
from Individual import Individual
from random import random, randint
class Algorithm():
#Constants
Uniform_rate = 0.5
Mutation_rate = 0.015
Tournament_size = 5
@cequencer
cequencer / numpy_kml_reader.py
Created October 30, 2015 15:42 — forked from achernet/numpy_kml_reader.py
KMZ/KML data reader with numpy
import requests
from lxml.html import etree, HTMLParser
import zipfile
import numpy as np
def read_kml(kmz_url):
resp = requests.get(kmz_url)
with open('/tmp/temp.kmz', 'wb') as f:
f.write(resp.content)
with zipfile.ZipFile('/tmp/temp.kmz') as zf: