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
// Version: 0.0.11-11-g134e758 | |
// Last commit: 134e758 (2014-01-02 16:25:13 +0100) | |
(function() { | |
'use strict'; | |
/** | |
The main namespace for Ember.SimpleAuth |
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
#!/bin/sh | |
if [ -e $(dirname "$0")/nsenter ]; then | |
# with boot2docker, nsenter is not in the PATH but it is in the same folder | |
NSENTER=$(dirname "$0")/nsenter | |
else | |
NSENTER=nsenter | |
fi | |
if [ -z "$1" ]; 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
React.render( | |
<h1>Hello, world!</h1>, | |
document.getElementById('container') | |
); |
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
//There id more information aboat this code in Page 26 of "Instruction manual-English.pdf" | |
// This code is for the bluetooth and infrared controlled ultrasonic arduino car. | |
// By default, the buttons 2, 4, 6 en 8 of the remote will move the car in infrared mode. | |
// Ultrasonic mode is enabled by the play/pause button. | |
// Track following is enabled by the EQ button. | |
// Button 5 will stop whatever the car is doing and enable button 2, 4, 6 en 8 again. | |
// Bluetooth is always enabled and available while in infrared mode. The password is 1234. | |
// | |
// Android car control app can be found here: |
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 SimpleForm | |
class FormBuilder < ActionView::Helpers::FormBuilder | |
# tried to monkey patch without copy'n'pasting, broke associations | |
def input(attribute_name, options={}, &block) | |
options = @defaults.deep_dup.deep_merge(options) if @defaults | |
chosen = | |
if name = options[:wrapper] | |
name.respond_to?(:render) ? name : SimpleForm.wrapper(name) | |
else |
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
// exercise-maps | |
// https://tour.golang.org/moretypes/19 | |
package main | |
import ( | |
"golang.org/x/tour/wc" | |
"strings" | |
) |
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
<!-- initializing Angular --> | |
<html ng-app> | |
<head> | |
<!-- setting default value --> | |
<script language="javascript"> | |
function Ctrl($scope) { | |
$scope.graph = 'noise_margin'; | |
} | |
</script> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.5/angular.min.js"></script> |
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
require 'ruby-debug' | |
words = ["akka", "play framework", "sbt", "typesafe"] | |
tweet = "This is an example tweet talking about scala and sbt." | |
words.any? do |word| | |
debugger | |
tweet.include?(word) | |
end |
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
# https://stackoverflow.com/questions/24030907/spork-0-9-2-and-rspec-3-0-0-uninitialized-constant-rspeccorecommandline-n/24085168#24085168 | |
# https://github.com/manafire/spork/commit/38c79dcedb246daacbadb9f18d09f50cc837de51#diff-937afaa19ccfee172d722a05112a7c6fL6 | |
class Spork::TestFramework::RSpec | |
def run_tests(argv, stderr, stdout) | |
if rspec1? | |
::Spec::Runner::CommandLine.run( | |
::Spec::Runner::OptionParser.parse(argv, stderr, stdout) | |
) | |
elsif rspec3? |
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
#user nobody; | |
#Defines which Linux system user will own and run the Nginx server | |
worker_processes 1; | |
#Referes to single threaded process. Generally set to be equal to the number of CPUs or cores. | |
#error_log logs/error.log; #error_log logs/error.log notice; | |
#Specifies the file where server logs. |
OlderNewer