Skip to content

Instantly share code, notes, and snippets.

Avatar
🧱

Mark Steve Samson marksteve

🧱
View GitHub Profile
View alacritty_tokyo_night.yml
# Colors (Tokyo Night)
colors:
# Default colors
primary:
background: '#1a1b26'
foreground: '#a9b1d6'
# Normal colors
normal:
@marksteve
marksteve / mintty-tokyo-night
Created Aug 21, 2020
Mintty/WSLtty scheme for the Tokyo Night theme
View mintty-tokyo-night
# 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
View setup_rathena_db.ps1
"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
View pgmodeler-brew.md
View password.html
<!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 Oct 29, 2019
Makefile for Python projects
View Makefile
.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
View remote_prompt.sh
#!/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
View partition.py
import itertools
def partition(n):
x = 1
_sum = 0
# Get possible addends
addends = set()
while _sum < n:
@marksteve
marksteve / _redux.ex
Last active Jun 4, 2016 — forked from rstacruz/_redux.ex
Redux.ex (elixir)
View _redux.ex
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" })
"""
View watson-log-csv-export.py
"""
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