Skip to content

Instantly share code, notes, and snippets.

Loki Coyote lokkju

Block or report user

Report or block lokkju

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 install_xmr_stak.md

from https://www.rooselaers.be/

for Nvidia GPU

wget https://developer.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.168_418.67_linux.run

sudo sh cuda_10.1.168_418.67_linux.run

Un-check the "Driver" block and then select "Install" and hit "Enter".

┌──────────────────────────────────────────────────────────────────────────────┐

@lokkju
lokkju / fare_rules.yaml
Created Nov 11, 2019
Examples of querying kiwi.com's flight API (and returning results based on earned elite qualifying mileage for American Airlines)
View fare_rules.yaml
AA:
codes:
F: {award_mod: 1.0, bonus_mod: 1.0, qm_mod: 3.0, eqd_mod: .40, eqs_mod: 1.0, name: First}
A: {award_mod: 1.0, bonus_mod: 1.0, qm_mod: 2.0, eqd_mod: .40, eqs_mod: 1.0, name: First}
J: {award_mod: 1.0, bonus_mod: 1.0, qm_mod: 3.0, eqd_mod: .40, eqs_mod: 1.0, name: Business}
R: {award_mod: 1.0, bonus_mod: .75, qm_mod: 2.0, eqd_mod: .35, eqs_mod: 1.0, name: Business}
D: {award_mod: 1.0, bonus_mod: .50, qm_mod: 2.0, eqd_mod: .30, eqs_mod: 1.0, name: Business}
I: {award_mod: 1.0, bonus_mod: 0.0, qm_mod: 2.0, eqd_mod: .20, eqs_mod: 1.0, name: Business}
W: {award_mod: 1.0, bonus_mod: 0.0, qm_mod: 1.5, eqd_mod: .20, eqs_mod: 1.0, name: Premium Economy}
P: {award_mod: 1.0, bonus_mod: 0.0, qm_mod: 1.5, eqd_mod: .20, eqs_mod: 1.0, name: Premium Economy}
@lokkju
lokkju / rotating_vigenere_decoder.py
Last active Oct 7, 2018
rotating vigenere decoder for adversary group
View rotating_vigenere_decoder.py
from itertools import count
from string import ascii_letters
_cidx = dict(zip(ascii_letters, count(1)))
def decipher(key,enc,rot):
"""
Deciphers Vigenere cipher with the given key and rotated alphabet
Parameters:
View get_etherium_node_ips.sh
curl "https://www.ethernodes.org/network/1/data?draw=1&columns%5B0%5D%5Bdata%5D=id&columns%5B0%5D%5Bname%5D=&columns%5B0%5D%5Bsearchable%5D=true&columns%5B0%5D%5Borderable%5D=true&columns%5B0%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B0%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B1%5D%5Bdata%5D=host&columns%5B1%5D%5Bname%5D=&columns%5B1%5D%5Bsearchable%5D=true&columns%5B1%5D%5Borderable%5D=true&columns%5B1%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B1%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B2%5D%5Bdata%5D=port&columns%5B2%5D%5Bname%5D=&columns%5B2%5D%5Bsearchable%5D=true&columns%5B2%5D%5Borderable%5D=true&columns%5B2%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B2%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B3%5D%5Bdata%5D=country&columns%5B3%5D%5Bname%5D=&columns%5B3%5D%5Bsearchable%5D=true&columns%5B3%5D%5Borderable%5D=true&columns%5B3%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B3%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B4%5D%5Bdata%5D=clientId&columns%5B4%5D%5Bname%5D=&columns%5B4%5D%5Bsearchable%5D=true&columns%5B4%5D%5Borderable%5D=tr
View collect_limit.scala
package org.apache.spark.sql.catalyst.expressions
import org.apache.spark.sql._
import org.apache.spark.sql.catalyst._
import org.apache.spark.sql.catalyst.analysis._
import org.apache.spark.sql.catalyst.expressions.aggregate._
import org.apache.spark.sql.types._
import scala.collection.mutable
View gist:a8a4187cda502b346860bd66677964f3
def time[R](block: => R): R = {
val t0 = System.nanoTime()
val result = block // call-by-name
val t1 = System.nanoTime()
println("Elapsed time: " + (t1 - t0) + "ns")
result
}
@lokkju
lokkju / crosstool-NG.patch
Created Oct 13, 2015
Patch to allow building Expressif on case insensitive filesystems
View crosstool-NG.patch
diff --git crosstool-NG/scripts/crosstool-NG.sh.in crosstool-NG/scripts/crosstool-NG.sh.in
--- a/scripts/crosstool-NG.sh.in
+++ b/scripts/crosstool-NG.sh.in
@@ -84,14 +84,14 @@
# Where will we work?
-CT_WORK_DIR="${CT_WORK_DIR:-${CT_TOP_DIR}/.build}"
-CT_DoExecLog ALL mkdir -p "${CT_WORK_DIR}"
-CT_DoExecLog DEBUG rm -f "${CT_WORK_DIR}/backtrace"
+# CT_WORK_DIR="${CT_WORK_DIR:-${CT_TOP_DIR}/.build}"
View axion-release configuration for publishing github releases as X.X.X-RELEASE
plugins {
id 'pl.allegro.tech.build.axion-release' version '1.2.3'
id 'java'
id 'maven'
}
scmVersion {
tag {
prefix = ''
serialize = {config, version -> "$version-RELEASE"}
@lokkju
lokkju / vaulty-decode.py
Created Nov 6, 2014
Decode Vaulty protected .vdata files
View vaulty-decode.py
#!/usr/bin/python
# This program will copy, rename and decode Vaulty .vdata files back to images and videos for viewing in normal applications.
# Usage: python vaulty-decode.py <directory with .vdata files>
import sys
import os
import glob
import io
@lokkju
lokkju / find_system_python_dylibs.sh
Last active Dec 10, 2015
This script prints the filenames of any libs in your /usr/local/lib that depend on the System Python. It is especially useful if you use a non-system Python, but have previously compiled extensions against the System Python - it will tell you which need to be recompiled.
View find_system_python_dylibs.sh
#!/bin/bash
echo "This script prints the filenames of any dylibs in your /usr/local/ that depend on the System Python"
for f in `find /usr/local/lib`; do
otool -L "$f" 2> /dev/null| grep Python | grep System &> /dev/null
status=$?
if [ $status -eq 0 ]; then
echo "$status: $f"
fi
done
You can’t perform that action at this time.