Skip to content

Instantly share code, notes, and snippets.

microservice party

Daniel Pritchett ⚡ dpritchett

microservice party
View GitHub Profile
View 00_memetech scoreboard.txt
184 meltheous
164 gpspake tbqh
110 syliddar
98 dpritchett is happy
54 vongrippen
46 bkmontgomery
40 sbramlett
36 dan9186
32 my username can be as long as I damn well please GEORGE
32 B R Y C E
#!/usr/bin/env sh
cd /Users/daniel/Projects/book/dpchat/Book
./rake clean screen &> log/build_log.txt
if ! grep 'Build failed' log/build_log.txt; then
# osascript is osx-only
osascript -e 'display notification "✅ Success! ✅" with title "bookbuild"'
View course
  • interpreter: A program that reads a plain text source code file and attempts to execute the contents
  • shell: a program that enables users to interactively explore their local operating system: its files, its utilities, and its peripherals. Examples: Bash, Powershell
  • string: a representation of plain text data => "hello".class => String
  • integer: a whole number => 100.class => Integer
  • function: a segment of code defined and named for reuse
       def hi(name)
         puts "Hi, #{name}!"
# This file is used by Rack-based servers to start the application.
require ::File.expand_path('../config/environment', __FILE__)
run Rails.application
View timedown.js
// setInterval returns a number that you can save here.
// When you're ready to stop the active timer you pass the saved number to clearInterval and the timer stops.
// This way you can track multiple timers running concurrently in a complex app.
var mainTimerHandle = null;
// these are simple javascript objects.
// this is an Array of three Objects, each of which has a startAt number and a current number.
var clocks = [
  • In the context of the window, start a timer (setInterval) to do a thing every 1000 ms
  • that thing: tryToTickEachClockOnce():
    • find all clocks on the page
    • for each of those clocks, call decrementByOneSecondUnlessAlreadyZero(thisClockInParticular)
dpritchett / policy.xml
Created May 3, 2016
imagetragick fixed policy.xml example - see the last block
View policy.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policymap [
<!ELEMENT policymap (policy)+>
<!ELEMENT policy (#PCDATA)>
<!ATTLIST policy domain (delegate|coder|filter|path|resource) #IMPLIED>
<!ATTLIST policy rights CDATA #IMPLIED>
<!ATTLIST policy pattern CDATA #IMPLIED>
<!ATTLIST policy value CDATA #IMPLIED>
View cap_failure_log.txt
$ bx cap staging deploy:assets:backup_manifest -vvvv
triggering load callbacks
* 2016-04-29 18:35:26 executing `staging'
triggering start callbacks for `deploy:assets:backup_manifest'
* 2016-04-29 18:35:26 executing `multistage:ensure'
* 2016-04-29 18:35:26 executing `deploy:assets:backup_manifest'
* executing "ls /var/www/sites/*"
servers: [""]
[] executing command
command finished in 298ms
dpritchett /
Last active Jan 11, 2022
Programming as Theory Building

Programming as Theory Building

Peter Naur, 1985

(copied from,+Ehn,+Musashi%22)


The present discussion is a contribution to the understanding of what programming is. It suggests that programming properly should be regarded as an activity by which the programmers form or achieve a certain kind of insight, a theory, of the matters at hand. This suggestion is in contrast to what appears to be a more common notion, that programming should be regarded as a production of a program and certain other texts.