Skip to content

Instantly share code, notes, and snippets.

View zachshallbetter's full-sized avatar

Zach Shallbetter zachshallbetter

View GitHub Profile
@zachshallbetter
zachshallbetter / Devwars channel request
Created January 19, 2015 23:19
Twitch API: DevWars
{
"mature": false,
"status": "3 VS 3 and wait... 1 VS 1? #hypetrain",
"broadcaster_language": "en",
"display_name": "DevWars",
"game": "DevWars",
"delay": 0,
"language": "en",
"_id": 77543873,
"name": "devwars",
@zachshallbetter
zachshallbetter / gist:f506d77449eaa63140f5
Created January 18, 2015 03:38
Code Review Checklist

##General

  • Does the code work? Does it perform its intended function, the logic is correct etc.
  • Is all the code easily understood?
  • Does it conform to your agreed coding conventions? These will usually cover location of braces, variable and function names, line length, indentations, formatting, and comments.
  • Is there any redundant or duplicate code?
  • Is the code as modular as possible?
  • Can any global variables be replaced?
  • Is there any commented out code?
  • Do loops have a set length and correct termination conditions?
@zachshallbetter
zachshallbetter / factory-shared.js
Last active April 24, 2019 03:37 — forked from PatrickJS/factory-shared.es5.js
Examples of OOP "class" with "inheritance" done using JavaScript including languages that transpile into js. Take notice to the amount of boilerplate that's needed in ES5 compared to ES6. These examples all have the same interface with pros/cons for each pattern. If they seem similar that's whole point especially the difference between prototypa…
var EventEmitter = require('events').EventEmitter;
var _ = require('lodash');
// Factory shared
var makePerson = function() {
var person = {};
EventEmitter.call(person);
person.wallet = 0;
_.extend(person, personMethods)
return person;

Package Control Messages

Markdown Preview:

Sublime Text 2/3 Markdown Preview

Preview and build your markdown files quickly in your web browser from sublime text 2/3.

Package Control Messages

Markdown Preview:

Sublime Text 2/3 Markdown Preview

Preview and build your markdown files quickly in your web browser from sublime text 2/3.

Package Control Messages
========================
Markdown Preview:
----------------
Sublime Text 2/3 Markdown Preview
=================================
Preview and build your markdown files quickly in your web browser from sublime text 2/3.

Sass/Less Comparison

In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.

For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.

Variables

sqlalchemy.exc.ProgrammingError
ProgrammingError: (ProgrammingError) relation "user" does not exist
LINE 2: FROM "user"
^
'SELECT "user".created_on AS user_created_on, "user".updated_on AS user_updated_on, "user".id AS user_id, "user".email AS user_email, "user".password AS user_password, "user".first_name AS user_first_name, "user".last_name AS user_last_name, "user".active AS user_active, "user".requires_password_change AS user_requires_password_change, "user".is_admin AS user_is_admin, "user".is_superadmin AS user_is_superadmin \nFROM "user" \nWHERE "user".id = %(id_1)s \n LIMIT %(param_1)s' {'id_1': u'18', 'param_1': 1}
Traceback (most recent call last)
File "/var/www/venv/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__
return self.wsgi_app(environ, start_response)
File "/var/www/venv/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app
AH00112: Warning: DocumentRoot [/usr/docs/dummy-host.example.com] does not exist
AH00112: Warning: DocumentRoot [/usr/docs/dummy-host2.example.com] does not exist
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using Zacharys-MacBook-Pro.local. Set the 'ServerName' directive globally to suppress this message
[Mon Aug 11 08:41:46.973315 2014] [mpm_prefork:notice] [pid 1928] AH00163: Apache/2.4.9 (Unix) configured -- resuming normal operations
[Mon Aug 11 08:41:46.973534 2014] [core:notice] [pid 1928] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Mon Aug 11 09:42:47.181599 2014] [mpm_prefork:notice] [pid 1928] AH00169: caught SIGTERM, shutting down
AH00112: Warning: DocumentRoot [/usr/docs/dummy-host.example.com] does not exist
AH00112: Warning: DocumentRoot [/usr/docs/dummy-host2.example.com] does not exist
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using Zacharys-MacBook-Pro.local. Set the 'ServerName' directive globa
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost