Skip to content

Instantly share code, notes, and snippets.

View do-i's full-sized avatar

Joji Doi do-i

  • Ninjump
  • Holland, MI
View GitHub Profile
@do-i
do-i / money_data_schema_no_fk.sql
Last active September 17, 2015 14:57
Example of four types of table joins
DROP DATABASE IF EXISTS money_data;
CREATE DATABASE IF NOT EXISTS money_data;
USE money_data;
CREATE TABLE `exchange` (
`id` int NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`currency` varchar(64) NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886
#!/bin/bash
#
# Script downloads datafeed file from S3 and prints rows that do not have SUID value
#
if [ "$1" == "" ]; then
echo "usage: $0 <csv_file_path>"
echo "(e.g., $0 /tmp/suid-20180717203137-AAAAACTRAD8.csv.gz)"
exit 1
package generictest;
public class Caller<E> {
final private ClassOneSub<E> classOne;
final private ClassTwo<E> classTwo;
public Caller() {
classOne = new ClassOneSub<>();
classTwo = new ClassTwo<>();
package com.djd.fun.techchapter.demo021Cipher;
/*
The intelligence service intercepted some ciphertexts. It is known that plain text was encrypted using a cyclical shift method (Ceasar method). The idea of this method is that every letter in the plain text substituted with another letter with the fixed distance DIST. For example, for DIST=2 letter D will be replaced with F, Q with S and Z with B. It is known the enemy uses DIST= [0-25] and only English alphabet capital letters. Also, every message uses different DIST to make communication more secure. After hard work cryptographers could uncover partial content of the messages, now we can tell one of the words included for every message.
Input data:
In the first line, there is ciphertext intercepted by security service, in the second line is the plaintext word from the message. Both lines only contain English capitalized letters. Both lines are at most 40 letters length.
Output Data:
Print the decrypted text or "IMPOSSIBLE" if ciphertext cannot be decrypt
*.class
target/
*.iml
.idea/
.gradle
build/
out/
.attach_pid*
@do-i
do-i / .gitconfig
Created October 4, 2019 01:13
Git Config
[user]
name = First Last
email = first.last@gmail.com
[core]
editor = vim
autocrlf = false
[push]
default = upstream
[merge]
defaultToUpstream = true
package com.djd.fun.techchapter.demo022Bisection;
public class Bisection {
// Java program for implementation of Bisection Method
// for solving equations
static final float EPSILON = (float)0.00000001;
// An example function whose solution is determined using
// Bisection Method. The function is x^3 - x^2 + 2
@do-i
do-i / gist:70ccbfa9185e08e877b714277afbe889
Created November 14, 2019 22:27
auth0 user list fetcher
from auth0.v3.authentication import GetToken
from auth0.v3.management import Auth0
import argparse
import json
import logging
import csv
"""
Build:
python3 -m venv ~/envs/