Skip to content

Instantly share code, notes, and snippets.

Gianluca Bargelli proudlygeek

Block or report user

Report or block proudlygeek

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@proudlygeek
proudlygeek / golang-nuts.go
Created Aug 20, 2019 — forked from ryanfitz/golang-nuts.go
two ways to call a function every 2 seconds
View golang-nuts.go
package main
import (
"fmt"
"time"
)
// Suggestions from golang-nuts
// http://play.golang.org/p/Ctg3_AQisl
@proudlygeek
proudlygeek / hiring.js
Created Jan 24, 2019
Stuff for Konami Code
View hiring.js
console.log('%c We\'re hiring dumbass.', 'text-align: center; width: 600px; height: 100px; display: block; font-size: 14em; background-image: url(https://media.giphy.com/media/l0IydkTtMUaYmZqWk/giphy.gif)')
@proudlygeek
proudlygeek / hiring.js
Created Jan 24, 2019
Stuff for Konami Code
View hiring.js
console.log('%c We\'re hiring dumbass.', 'text-align: center; width: 600px; height: 100px; display: block; font-size: 14em; background-image: url(https://media.giphy.com/media/l0IydkTtMUaYmZqWk/giphy.gif)')
View broccoli_rspec_formatter.rb
class BroccoliFormatter
RSpec::Core::Formatters.register self, :dump_pending, :dump_failures, :close, :dump_summary, :example_passed, :example_failed, :example_pending
def initialize(output)
@output = output << "\n"
end
def example_passed(_notification)
@output << ' 🥦 '
end
@proudlygeek
proudlygeek / http_client_debugger.rb
Created Aug 14, 2018
HTTPClient custom request debugger
View http_client_debugger.rb
class Debugger
def <<(line)
puts line
end
end
client = HTTPClient.new
debugger = Debugger.new
client.debug_dev = debugger
View index.html
<!DOCTYPE html>
<html>
<body>
<h1>Test</h1>
</body>
<script>
alert(document.cookie);
</script>
</html>
View keybase.md

Keybase proof

I hereby claim:

  • I am proudlygeek on github.
  • I am proudlygeek (https://keybase.io/proudlygeek) on keybase.
  • I have a public key ASCrhfj21Ci8vJKQ0K0MX-MDMwTLajvk5tfT2VJv9IoFiAo

To claim this, I am signing this object:

@proudlygeek
proudlygeek / borrow.rs
Last active Jul 18, 2016
Rust Ownership / Borrow
View borrow.rs
fn sum_vectors(a: Vec<i32>, b: Vec<i32>) -> (Vec<i32>, Vec<i32>, Vec<i32>) {
let mut result: Vec<i32> = vec![0; 3];
for (i, _item) in a.iter().enumerate() {
result[i] = a[i] + b[i];
}
(a, b, result)
}
View getWeather.php
<?php
$apiKey = getenv('OPENWM_API_KEY') || file_get_contents( 'apikey');
$apiURL = 'http://api.openweathermap.org/data/2.5/forecast/daily';
$lat = $_GET[ 'lat' ];
$lon = $_GET[ 'lon' ];
echo file_get_contents( $apiURL . '?lat=' . $lat . '&lon=' . $lon . '&units=metric&cnt=1&APPID=' . $apiKey );
View alessinator.py
print 'lo so ' * 10000
You can’t perform that action at this time.