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 kolide | |
| import ( | |
| "time" | |
| "github.com/WatchBeam/clock" | |
| ) | |
| type Createable interface { | |
| MarkCreated(clock.Clock) |
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 ( | |
| "errors" | |
| "fmt" | |
| "sync" | |
| ) | |
| type counters struct { | |
| sum int |
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 <sys/types.h> | |
| #include <security/pam_appl.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| int conv_func(int msgs, const struct pam_message **msg, struct pam_response **resp, void *p ){ | |
| struct pam_response *aresp; |
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 -w | |
| require 'set' | |
| require 'open-uri' | |
| unique_sequences = {} | |
| duplicate_sequences = Set.new | |
| def get_sequences_from_word(word) |
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. |
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
| 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
| <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
| [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
| #!/bin/bash | |
| echo "Search ruby files containing $1 in $(pwd)" | |
| for f in `find . -name '*.rb'`; do grep -nH $1 $f; done |