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
steps: | |
- cmd: mcr.microsoft.com/oryx/pack:latest build {{.Run.Registry}}/nodeapp-{{.Run.ID}} --path . --builder mcr.microsoft.com/oryx/pack-builder:20190509.1 | |
- push: ["{{.Run.Registry}}/nodeapp-{{.Run.ID}}"] |
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 SOCKETIO_LISTEN_PORT = 81; | |
const PG_CONNECTION_STRING = 'postgres://dor@localhost/app'; | |
const PG_NOTIFICATION_CHANNEL = 'notifications'; | |
var pg = require('pg'), | |
sio = require('socket.io').listen(SOCKETIO_LISTEN_PORT); | |
var db = new pg.Client(PG_CONNECTION_STRING); | |
db.connect(); |
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 'listen' | |
path = ARGV[0] | |
abspath = File.expand_path(path) | |
file_name = File.basename(path) | |
file_dir = File.dirname(path) | |
if File.exists?(path) | |
then |
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
NameVirtualHost 127.0.0.1:80 | |
<VirtualHost 127.0.0.1:80> | |
ServerName pow | |
ServerAlias *.dev | |
ServerAlias *.xip.io | |
ProxyPass / http://localhost:20559/ | |
ProxyPassReverse / http://localhost:20559/ | |
ProxyPreserveHost On |
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
Show hidden characters
{ | |
"color_scheme": "Packages/Color Scheme - Default/Blackboard.tmTheme", | |
"font_size": 11.0, | |
"preview_on_click": true, | |
"word_wrap": false | |
} |
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
export PATH=/usr/local/bin:/usr/local/share/python:$PATH | |
export LSCOLORS=dxfxcxdxbxegedabagacad | |
autoload -U colors && colors | |
setopt PROMPT_SUBST | |
setopt autocd | |
setopt hist_reduce_blanks | |
function prompt_char |
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
from django.core import paginator | |
from django.core.paginator import EmptyPage, PageNotAnInteger | |
class Paginator(paginator.Paginator): | |
def __len__(self): | |
try: | |
return super(Paginator, self).__len__() | |
except TypeError: | |
return self.object_list.count() | |