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
module Main exposing (..) | |
import Http | |
import HttpBuilder exposing (..) | |
import Date exposing (Date) | |
import Html exposing (Html, button, div, text) | |
import Html.Events exposing (onClick) |
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
class SomeObject(object): | |
def some_func(): | |
dependency = SomeDependency() | |
dependency.do_something() | |
# and used in multiple places in many other files... | |
some_obj = SomeObject() | |
some_obj.some_func() | |
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 flask import Flask, request, redirect, jsonify | |
app = Flask(__name__) | |
body = None | |
@app.route('/cards', methods=['GET']) | |
def retrieve_card_stack(): | |
global body | |
if body is not None: |
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
(venv)jskulski@instrument ~/C/j/boneyard-client> npm install generator-mobile | |
npm WARN peerDependencies The peer dependency yo@>=1.0.0 included from generator-mobile will no | |
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency | |
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly. | |
npm WARN deprecated CSSselect@0.4.1: the module is now available as 'css-select' | |
npm WARN deprecated CSSwhat@0.4.7: the module is now available as 'css-what' | |
\ | |
> spawn-sync@1.0.11 postinstall /home/jskulski/Code/jskulski/boneyard-client/node_modules/yo/node_modules/cross-spawn/node_modules/spawn-sync | |
> node postinstall |
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
def spy(self): | |
def spy_function(*args, **kwargs): | |
spy_function.was_called = True | |
spy_function.was_called = False | |
return spy_function |
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
def test_that_editing_a_buffer_then_quitting_causes_save_dialog(self): | |
self.editor.gui.quitdialog.show = self.spy() | |
editor_input.type_keys('modify the buffer', self.editor) | |
self.editor.save_dialog_or_quit_editor() | |
self.assertTrue(self.editor.gui.quitdialog.show.was_called) |
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
<?php | |
class FileReader { | |
public function openFile($filePath, $fileMode) { | |
//... open file | |
} | |
public function readFile($filePath) { |
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
(ns loquat.core | |
(:use | |
[ring.adapter.jetty :as jetty])) | |
; Routing | |
(defroutes main-routes | |
(GET "/" [] "Hello World")) |
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
// this one | |
var one = require('one'), | |
two = require('two'), | |
three = require('three'); | |
// this one? | |
var one = require('one'), | |
two = require('two'), | |
three = require('three') | |
; |
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
update_current_git_vars |