Skip to content

Instantly share code, notes, and snippets.

View samiam2013's full-sized avatar

Sam Myres samiam2013

  • Wildfire
  • Western Kensucky
View GitHub Profile
@ClarkeRemy
ClarkeRemy / lifetimes.rs
Created October 24, 2022 16:54
Lifetimes Rust
fn main() {
let x1 = vec![1_u8];
let r1 = &x1[..]; // 'l1
let ret = {
let x2 = vec![2_u8];
let r2 = &x2[..]; // 'l2
let mut y2 = Holder(r2);// Holder<'l2>
package sshtest
import (
"io"
"github.com/gliderlabs/ssh"
)
// HoneyPot encapsulates the initialized struct
type HoneyPot struct {
package medium
import (
"net"
"golang.org/x/crypto/ssh"
)
func RunCmdOverSSH(addr, username, password, cmd string) ([]byte, error) {
cfg := &ssh.ClientConfig{
@lukas-h
lukas-h / license-badges.md
Last active August 22, 2025 00:33
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)

@Miserlou
Miserlou / cities.json
Created April 30, 2015 06:58
1000 Largest US Cities By Population With Geographic Coordinates, in JSON
[
{
"city": "New York",
"growth_from_2000_to_2013": "4.8%",
"latitude": 40.7127837,
"longitude": -74.0059413,
"population": "8405837",
"rank": "1",
"state": "New York"
},
@tmaiaroto
tmaiaroto / usc.go
Created November 7, 2014 20:25
Golang map of US state codes : full name
// A handy map of US state codes to full names
var usc = map[string]string{
"AL": "Alabama",
"AK": "Alaska",
"AZ": "Arizona",
"AR": "Arkansas",
"CA": "California",
"CO": "Colorado",
"CT": "Connecticut",
@erichurst
erichurst / US Zip Codes from 2013 Government Data
Created December 9, 2013 23:00
All US zip codes with their corresponding latitude and longitude coordinates. Comma delimited for your database goodness. Source: http://www.census.gov/geo/maps-data/data/gazetteer.html
This file has been truncated, but you can view the full file.
ZIP,LAT,LNG
00601,18.180555, -66.749961
00602,18.361945, -67.175597
00603,18.455183, -67.119887
00606,18.158345, -66.932911
00610,18.295366, -67.125135
00612,18.402253, -66.711397
00616,18.420412, -66.671979
00617,18.445147, -66.559696