Skip to content

Instantly share code, notes, and snippets.

View marksteve's full-sized avatar
🏠

Mark Steve Samson marksteve

🏠
View GitHub Profile
# Colors (Tokyo Night)
colors:
# Default colors
primary:
background: '#1a1b26'
foreground: '#a9b1d6'
# Normal colors
normal:
@marksteve
marksteve / mintty-tokyo-night
Created August 21, 2020 02:13
Mintty/WSLtty scheme for the Tokyo Night theme
# https://github.com/enkia/tokyo-night-vscode-theme
Black = 54,59,84
Blue = 122,162,247
Green = 65,166,181
Cyan = 125,207,255
Red = 247,118,142
Magenta = 187,154,247
Yellow = 224,175,104
White = 120,124,153
"DROP DATABASE RAGNAROK" | mysql -u root -p
"CREATE DATABASE ragnarok CHARACTER SET utf8 COLLATE utf8_bin;" | mysql -u root -p
Get-Content main.sql | mysql -u root -p ragnarok
Get-Content logs.sql | mysql -u root -p ragnarok

Building pgModeler in MacOS with Homebrew

The official installation instructions for pgModeler recommends installing Xcode and the Enterprise DB distribution of Postgres to fulfill its build requirements. Luckily, Homebrew's got us covered!

  1. Checkout the source

    git clone https://github.com/pgmodeler/pgmodeler.git
    
<!DOCTYPE html>
<html lang=en>
<meta charset=utf-8>
<meta name=viewport content=width=device-width>
<title>password</title>
<style>*{margin:0;padding:0}body,input{font:14px/1 Arial,Helvetica,sans-serif}body{padding:5em 1em;text-align:center;}input{padding:0.2em;margin:0.2em;}#d{font-size:4em}</style>
<p><input id=a type=password placeholder="master password"></p>
<p><input id=b placeholder=indentifier size=18><input id=c size=1 value=8></p>
<p id=d>password</p>
<script>
@marksteve
marksteve / Makefile
Last active October 29, 2019 03:20
Makefile for Python projects
.PHONY: dev
dev: venv/bin/pip-sync requirements.txt
venv/bin/pip-sync
requirements.txt: venv/bin/pip-compile requirements.in
venv/bin/pip-compile \
--no-index \
--no-emit-trusted-host \
requirements.in > requirements.txt
venv/bin/pip-compile venv/bin/pip-sync: venv
venv/bin/pip install wheel pip-tools
#!/bin/bash
# curl -L https://git.io/remote_prompt.sh | bash
RS="\[\033[0m\]" # reset
FBLK="\[\033[30m\]" # foreground black
BRED="\[\033[41m\]" # background red
echo >> ~/.bashrc
echo "export PS1='$FBLK$BRED\u@\h$RS:\w\$ '" >> ~/.bashrc
import itertools
def partition(n):
x = 1
_sum = 0
# Get possible addends
addends = set()
while _sum < n:
@marksteve
marksteve / _redux.ex
Last active June 4, 2016 03:38 — forked from rstacruz/_redux.ex
Redux.ex (elixir)
defmodule Redux do
@moduledoc """
Like redux.js, but more elixir-like
store = create_store fn state, action -> ... end
store |> get_state()
store |> dispatch(%{ type: "publish" })
"""
"""
Usage:
watson log > watson-log
curl https://gist.githubusercontent.com/marksteve/fed69cc86cf8f0c0e104af55516a644d/raw/85b460cceea45236ac400df716985ef996565c92/watson-csv-export.py | python - watson-log
"""
import csv
import fileinput
import re