Nothing Special   »   [go: up one dir, main page]

Skip to content

Instantly share code, notes, and snippets.

View teneightfive's full-sized avatar

Dom Smith teneightfive

View GitHub Profile
@matharden
matharden / presenting-checklist.md
Last active July 16, 2020 10:16
Checklist for when about to present to people

Presenting Checklist (Mac OS)

  • Turn off notifications (ALT+click Notification Center)
  • Turn off Bluetooth (in case someone sits on your Bluetooth keyboard/mouse, unless you're using Bluetooth of course)
  • Turn off f.lux (can catch you out when using projectors)
  • Prevent your computer from sleeping. Run Caffeine (or use settings to not let your computer sleep)
  • Always run slides in presentation mode
@mikermcneil
mikermcneil / example-of-how-to-import-data-into-sails-app.js
Last active March 23, 2020 10:59
An example script that imports data from a JSON file into a Sails.js app (feel free to use as a seed/boilerplate script, whatever you like)
#!/usr/bin/env node
/**
* Module dependencies
*/
var Async = require('async');
var Filesystem = require('machinepack-fs');
var Prompts = require('machinepack-prompts');
var Sails = require('sails').Sails;
@yoavniran
yoavniran / ultimate-ut-cheat-sheet.md
Last active October 1, 2024 17:10
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
@edwardhorsford
edwardhorsford / govuk_service_email_template
Last active April 19, 2016 15:07
GOV.UK service email template
<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<!-- This disables auto detection of phone numbers in some clients. Remove if not needed. -->
<meta name="format-detection" content="telephone=no">
<title>Page title</title>
</head>
<body style="font-family: Helvetica, Arial, sans-serif;font-size: 16px;margin: 0;color:#0b0c0c">
@mikepea
mikepea / pr_etiquette.md
Last active November 19, 2024 02:31
Pull Request Etiquette

Pull Request Etiquette

Why do we use a Pull Request workflow?

PRs are a great way of sharing information, and can help us be aware of the changes that are occuring in our codebase. They are also an excellent way of getting peer review on the work that we do, without the cost of working in direct pairs.

Ultimately though, the primary reason we use PRs is to encourage quality in the commits that are made to our code repositories

Done well, the commits (and their attached messages) contained within tell a story to people examining the code at a later date. If we are not careful to ensure the quality of these commits, we silently lose this ability.

@giuseppeg
giuseppeg / app-structure.md
Last active August 29, 2015 14:10
app front-end structure

Components (or modules) talk to each other via events.

  • vendor [3rd party scripts, this could as well be bower_components if you use bower]
  • core [app core functionalities/utilities]
  • component
    • component1
      • index.js [the actual js component]
      • spec.js [tests]
      • style.css [component styles]
  • index.partial.template
@oyyd
oyyd / README.md
Last active August 21, 2024 02:24
Days-Hours Heatmap
@riverspirit
riverspirit / mindbody.js
Created July 1, 2014 12:23
Connect to MindBody API using Node.js
// mindbody.js
// Replace source_name, password and site_id values in `var params`
var soap = require('soap');
module.exports = {
getClasses: function (req, res) {
var url = "https://api.mindbodyonline.com/0_5/ClassService.asmx?wsdl";
soap.createClient(url, function (err, client) {
if (err) {
@camillebaldock
camillebaldock / oyster.rb
Last active February 4, 2017 13:43
Oyster journey history scraping script
require 'rubygems'
require 'capybara'
require 'capybara/dsl'
require 'capybara/poltergeist'
require 'awesome_print'
Capybara.run_server = false
Capybara.current_driver = :poltergeist
class Oyster
@lfender6445
lfender6445 / gist:9919357
Last active November 18, 2024 20:32
Pry Cheat Sheet

Pry Cheat Sheet

Command Line

  • pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)
  • pry -r ./config/environment.rb - load your rails into a pry session

Debugger