Skip to content

Instantly share code, notes, and snippets.

View ninnemana's full-sized avatar
🏠

Alex Ninneman ninnemana

🏠
View GitHub Profile
@ninnemana
ninnemana / variadics.go
Created March 23, 2023 20:21
Variadic Example
package main
import (
"context"
"errors"
"fmt"
)
type (
Service struct {
gcloud compute firewall-rules create default-allow-${HOST%.*} \
--allow tcp:6443 \
--target-tags ${HOST%.*}-cluster \
--source-ranges 0.0.0.0/0
@ninnemana
ninnemana / fusion.json
Created August 11, 2016 14:52
MongoDB Fitment Schema Example
{
"year": "2014",
"make": "Ford",
"model": "Fusion",
"style": "All",
"products": [{
"id": 11000,
"attributes": [{
"key": "Install Time",
"value": "10 minutes"
<div id="hitchlookup" class="width-100">
<span id="closeLookup">X</span>
<p>Quick Vehicle Lookup</p>
<form method="get" id="hitchLookupForm" name="hitchLookup_compressed" action="@Url.Content("~/HitchLookup/find")">
<div>
<!-- Select Year -->
<select disabled="disabled" name="year" id="select_year" required>
<option value="">Select Year</option>
@*foreach (string year in years) {
<option value="@year">@year</option>
@ninnemana
ninnemana / facebook.go
Created July 8, 2016 17:40
Facebook Initial code challenge
// Problem: Given a sequence of nonnegative integers A and an integer T, return whether there is a *continuous sequence* of A that sums up to exactly T
// Example:
// [23, 5, 4, 7, 2, 11], 20. Return True because 7 + 2 + 11 = 20
// [1, 3, 5, 23, 2], 8. Return True because 3 + 5 = 8
// [1, 3, 5, 23, 2], 7 Return False because no sequence in this array adds up to 7
// Note: We are looking for an O(N) solution. There is an obvious O(N^2) solution which is a good starting point but is not the final solution we are looking for. It’s important for the code to be as efficient as possible
.ui-tabs-vertical .ui-tabs-nav {
padding: .2em .1em .2em .2em;
float: left;
width: 18%;
border: 0px;
background: #FFFFFF no-repeat;
overflow: hidden;
border-radius: 0;
box-shadow: -7px 0 7px #eaeaea inset;
}
{
"year": "2010",
"make": "",
"model": "",
"style": "",
"exposed": "",
"drilling": "",
"installTime": "",
"availableMakes": [
"Acura",
server {
listen 80;
server_name _;
set $site_root /data/www/$host;
set $log_root $site_root/logs;
location / {
root $site_root;
<md-icon>shopping_cart</md-icon>
@ninnemana
ninnemana / atom
Created September 2, 2015 18:36
List of the packages that I currently have installed.
Sublime-Style-Column-Selection
atom-beautify
atom-csscomb
atom-jshint
color-picker
compass
emmet
go-plus
language-babel
linter