Skip to content

Instantly share code, notes, and snippets.

View marksteve's full-sized avatar
🏠

Mark Steve Samson marksteve

🏠
View GitHub Profile

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
    
@marksteve
marksteve / gist:877210
Created March 19, 2011 04:04
Monokai Notepad2 Color Scheme
[Default Text]
FileNameExtensions=txt; text; wtx; log; asc; doc; diz; nfo
Default Style=font:Consolas; size:10; fore:#F8F8F2; back:#272822
Margins and Line Numbers=size:-2; fore:#BCBCBC; back:#3B3A32
Matching Braces=size:+1; bold; fore:#000000; back:#FD971F
Matching Braces Error=size:+1; bold; fore:#F8F8F0; back:#F92672
Control Characters (Font)=size:-1
Indentation Guide (Color)=fore:#A0A0A0
Selected Text (Colors)=fore:#F8F8F2; back:#49483E; eolfilled
Whitespace (Colors, Size 0-5)=
# 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
@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
@marksteve
marksteve / pelican_deployer.py
Last active January 25, 2019 23:51
Push-to-deploy static sites with Pelican, Flask and Github
"""
Simple web server that listens for Github webhooks to implement push-to-deploy
with Pelican static sites
Settings are loaded from a json file except for SECRET which should be an
environment variable
Example `deployer.json`
{
"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
@marksteve
marksteve / Backbone.View.Autocomplete.js
Created May 3, 2011 10:54
Backbone View for jQuery UI Autocomplete inputs
var Autocomplete = Backbone.View.extend({
render: function() {
var choices = this.options.choices,
selected = this.options.selected,
iterator = this.options.iterator,
label = this.options.label,
allowDupes = this.options.allowDupes,
$el = $(this.el);
$el.autocomplete({
source: function(request, response) {
<!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>
#!/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