Skip to content

Instantly share code, notes, and snippets.

View atrauzzi's full-sized avatar

Alexander Trauzzi atrauzzi

View GitHub Profile
@MelbourneDeveloper
MelbourneDeveloper / CodeAnalysis.csproj
Created December 19, 2021 10:22
Code Analysis csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<AnalysisLevel>latest</AnalysisLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
@davidfowl
davidfowl / Program.cs
Last active December 26, 2021 00:27
A minimal fully asynchronous C# ASP.NET Core 3.0 application with routing (learn more about ASP.NET Core here https://docs.microsoft.com/en-us/aspnet/core/?view=aspnetcore-3.0)
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Hosting;
public class Program
{
public static void Main(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
@mistydemeo
mistydemeo / mondragons_tofu.md
Last active January 4, 2024 18:59
Mondragon's southern fried tofu

Mondragon's southern fried tofu

Ingredients

  • 1 1/2 cups nutritional yeast
  • 1/2 cup corn meal
  • 2 tbsp salt
  • 1/2 tbsp garlic powder
  • 1/2 tbsp onion powder
  • 3/4 tsp pepper
@mykelswitzer
mykelswitzer / component.jsx
Created September 11, 2015 00:41
React.js with pickadate.js
// How to get the pickadate to mount correcty in React.js component
// requires jQuery and pickadate.js (https://github.com/amsul/pickadate.js/)
var Component = React.createClass({
getInitialState: function() {
return ({value: null});
},
componentDidMount: function() {
@StefanieD
StefanieD / Readme.md
Created July 3, 2015 15:17
Install and use Supervisord with AWS Elastic Beanstalk, Symfony 2 and RabbitMq Bundle
  • Place the supervisord.conf under .ebextensions/supervisor/

  • Place the supervisor.config under .ebextensions/

  • Place the data_import_consumer.conf under .ebextensions/supervisor/

@iainconnor
iainconnor / setup.sh
Last active September 8, 2019 16:00
OSX Setup
me=$(whoami)
# Get Sudo.
if [ $EUID != 0 ]; then
sudo "$0" "$@"
exit $?
fi
# Install Xcode command line tools.
xcode-select --install

Angular2 + JSPM cheat sheet

First time setup

  • install jspm beta: npm install -g jspm@beta
  • set up your project: jspm init
  • install dependencies: jspm install angular2 reflect-metadata zone.js es6-shim

This will create a jspm_packages folder, and a config.js file.

Open the config.js file - this file manages options for the System.js loader - tweak it as appropriate

@chantastic
chantastic / on-jsx.markdown
Last active March 20, 2024 01:03
JSX, a year in

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't

@kimus
kimus / ufw.md
Created March 2, 2014 22:46
NAT and FORWARD with Ubuntu’s ufw firewall

UFW

I use Ubuntu’s Uncomplicated firewall because it is available on Ubuntu and it's very simple.

Install UFW

if ufw is not installed by default be sure to install it first.

@ericbmerritt
ericbmerritt / gist:4013729
Created November 4, 2012 20:53
A script to generate a valid semver version in any git repo
#!/bin/bash
#
# If run inside a git repository will return a valid semver based on
# the semver formatted tags. For example if the current HEAD is tagged
# at 0.0.1, then the version echoed will simply be 0.0.1. However, if
# the tag is say, 3 patches behind, the tag will be in the form
# `0.0.1+build.3.0ace960`. This is basically, the current tag a
# monotonically increasing commit (the number of commits since the
# tag, and then a git short ref to identify the commit.
#