This file contains hidden or 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
| int led_pin = 13; | |
| int pir_pin = 2; | |
| int pir_state = LOW; | |
| int pin_status = 0; | |
| void setup() { | |
| pinMode( led_pin, OUTPUT ); | |
| pinMode( pir_pin, INPUT ); | |
| Serial.begin(9600); |
This file contains hidden or 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
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <string.h> | |
| int main( int argc, char* argv[] ) { | |
| if( argc < 3 ) { | |
| printf( "Usage: repl <word> <char to replace>\n" ); | |
| return 1; |
This file contains hidden or 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
| log_level :info | |
| log_location STDOUT | |
| node_name 'east-prod-jumpserver' |
This file contains hidden or 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
| export PATH=/Applications/Postgres93.app/Contents/MacOS/bin:$PATH |
This file contains hidden or 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/bash | |
| echo "Search ruby files containing $1 in $(pwd)" | |
| for f in `find . -name '*.rb'`; do grep -nH $1 $f; done |
This file contains hidden or 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
| [alias] | |
| lg1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all | |
| lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all | |
| lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%C(bold blue)<%an>%Creset' --abbrev-commit | |
| [core] | |
| excludesfile = /Users/a918144/.gitignore_global | |
| [difftool "sourcetree"] | |
| cmd = opendiff \"$LOCAL\" \"$REMOTE\" | |
| path = | |
| [mergetool "sourcetree"] |
This file contains hidden or 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
| <script> | |
| console.log( "creating field selector" ); | |
| var field_selector = new Agsolver.FieldSelector( { | |
| map_div_id: 'map', | |
| geoserver_url: "<%= ENV['GEOSERVER_URL'] %>", | |
| editable: true, | |
| input_div_id: 'prospector_field_map_coords_as_geojson' | |
| }); | |
| </script> |
This file contains hidden or 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
| if idIf, ok := m.Data["id"]; ok { | |
| switch idIf.(type) { | |
| case float64: | |
| id := int64(idIf.(float64)) | |
| c.hMu.Lock() | |
| defer c.hMu.Unlock() | |
| if ch, ok := c.handler[id]; ok { |
This file contains hidden or 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
| package main | |
| import "fmt" | |
| func newMatrix(r int) []string { | |
| grid := make([]string, 0, r) | |
| for j := 0; j < r; j++ { | |
| var s string | |
| fmt.Scan(&s) |
This file contains hidden or 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
| #!/usr/bin/env ruby | |
| # Adds new method to the Array class that flattens arrays of ints | |
| # non-integer elements in the array will raise | |
| # an exception. |