Skip to content

Instantly share code, notes, and snippets.

View jrbasso's full-sized avatar

Juan Basso jrbasso

  • Zumba
  • Pembroke Pines, FL, USA
  • X @jrbasso
View GitHub Profile

Run go install and

  • gogitlocalstats -add /path/to/folder will scan that folder and its subdirectories for repositories to scan
  • gogitlocalstats -email your@email.com will generate a CLI stats graph representing the last 6 months of activity for the passed email. You can configure the default in main.go, so you can run gogitlocalstats without parameters.

Being able to pass an email as param makes it possible to scan repos for collaborators activity as well.

License: CC BY-SA 4.0

@vinaygopinath
vinaygopinath / place-autocomplete.css
Last active August 15, 2018 06:11
Google maps location/place suggestions with Angular material autocomplete (md-autocomplete) https://plnkr.co/edit/dITwTF?p=preview
/*
Optional adjustments for md-autocomplete in mobile screens
*/
#place-autocomplete > md-autocomplete md-input-container {
margin-top: -10px;
}
/*Media query for tablets and above */
@harlow
harlow / golang_job_queue.md
Last active March 4, 2024 21:16
Job queues in Golang
@nima-nekoui
nima-nekoui / gist:d0f40c96767a04af794a
Created June 3, 2015 02:11
CakeFest 2015 Presentations CSV
id,type
1,Workshop
2,Conference
3,Lightning
id,presenter,presentation_title,slide_link,repo_link,presentation_type_id,created,updated
2,"Curtis Gibby",PHP_CodeSniffer,http://slides.com/curtisgibby/cakefest-phpcs,,3,"2015-05-31 18:01:04",NULL
3,"Brian Porter","Running a CakePHP App in Different Operating Environments",https://github.com/beporter/CakePHP-EnvAwareness/raw/master/slides/env-aware-cake-apps.pdf,https://github.com/beporter/CakePHP-EnvAwareness,2,"2015-05-31 18:02:11",NULL
@zhum
zhum / go-sort-insert.go
Created April 30, 2015 09:38
Golang function to insert in sorted array
// Mytype must implement Less func.
func SortedInsert (s []Mytype, f Mytype) []Mytype {
l:=len(s)
if l==0 { return [f] }
i := sort.Search(l, func(i int) bool { return s[i].Less(f)})
if i==l { // not found = new value is the smallest
return append([f],s)
}
@ismasan
ismasan / sse.go
Last active March 19, 2024 18:13
Example SSE server in Golang
// Copyright (c) 2017 Ismael Celis
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all

Falsehoods programmers believe about prices

  1. You can store a price in a floating point variable.
  2. All currencies are subdivided in 1/100th units (like US dollar/cents, euro/eurocents etc.).
  3. All currencies are subdivided in decimal units (like dinar/fils)
  4. All currencies currently in circulation are subdivided in decimal units. (to exclude shillings, pennies) (counter-example: MGA)
  5. All currencies are subdivided. (counter-examples: KRW, COP, JPY... Or subdivisions can be deprecated.)
  6. Prices can't have more precision than the smaller sub-unit of the currency. (e.g. gas prices)
  7. For any currency you can have a price of 1. (ZWL)
  8. Every country has its own currency. (EUR is the best example, but also Franc CFA, etc.)
@LeverOne
LeverOne / LICENSE.txt
Created October 24, 2011 04:17 — forked from jed/LICENSE.txt
generate random v4 UUIDs (107 bytes)
DO WTF YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Alexey Silin <pinkoblomingo@gmail.com>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WTF YOU WANT TO PUBLIC LICENSE