This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
**Patreon**(http://www.patreon.com/) is a service that connects **patrons** with **creators**. A creator promises to produce creations; these could be videos, songs, podcast episodes, comics, or anything else that can be delivered digitally. | |
Each patron is automatically a creator if they create a **creator's** **page**. A creator charges patrons **per creation** or **per month** (of creations). A creator creates **posts** for their page (think "blog"). A post has content (displayed in a feed of posts); some posts have a creation that needs to be billed. | |
The creator also establishes **reward** **tiers** for their page (e.g., $1 per whatever, $5 per whatever, $25 per whatever). A patron chooses a tier *and* an amount for their pledge; they must pledge as much or *more* than their reward tier. A post is either public or linked to a reward tier. The content of public posts can be seen by everyone, even visitors not logged in; the content of posts tied to a reward tier can be seen by a patron at that tier or h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: mongo-configmap | |
labels: | |
app: meal-plan-app | |
component: mongo-db | |
data: | |
MONGO_INITDB_ROOT_USERNAME: root | |
MONGO_INITDB_ROOT_PASSWORD: rootR0xks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
man dmesg | |
Get is list of killed processes | |
``` | |
dmesg -TL | |
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import argparse | |
import sys | |
import sqlparse | |
from pygments import highlight | |
from pygments.lexers import get_lexer_by_name | |
from pygments.formatters import TerminalTrueColorFormatter | |
def prettyPrint(raw_sql): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE USER postgres; | |
SELECT rolname FROM pg_roles; | |
ALTER USER postgres WITH CREATEUSER; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'pry' | |
class PropParser | |
HEX = %w(8 9 A B C D E F) | |
attr_reader :colors | |
def self.execute(source_file, out_file) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const daysAgo = ((days, date) => { let d = date || new Date(); d.setDate(d.getDate() - (days || 1)); return d; }); | |
const hoursAgo = ((hours, date) => { let d = date || new Date(); d.setHours(d.getHours() - (hours || 1)); return d; }); | |
const mintuesAgo = ((mins, date) => { let d = date || new Date(); d.setMinutes(d.getMinutes() - (mins || 1)); return d; }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%s/\(Foo::SubFoo::.*\.name\)/"#{\1}"/g | |
[ | |
Foo::SubFoo::One, | |
Foo::SubFoo::Two, | |
Foo::SubFoo::Three, | |
Foo::SubFoo::Four | |
] | |
# => |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hardstatus alwayslastline | |
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %m-%d %{W}%c %{g}]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'benchmark/ips' | |
module ExtraMath | |
def self.build_math(attr_name) | |
attr_name = attr_name.to_s | |
class_eval %Q{ | |
def #{attr_name}(x) | |
x + x | |
end | |
} |
NewerOlder