Skip to content

Instantly share code, notes, and snippets.

@kevincolten
kevincolten / Webserver.cs
Last active June 13, 2018 01:52
C# Webserver
using System;
using System.Threading;
using SimpleHttp;
using System.IO;
using System.Linq;
using Microsoft.Data.Sqlite;
using System.Collections.Generic;
namespace WebServer
{
using System;
using System.Collections.Generic;
using System.Linq;
namespace Checkers
{
class Program
{
static void Main(string[] args)
{
@kevincolten
kevincolten / Rainforest.cs
Last active May 23, 2018 01:44
Rainforest OOP
using System;
using System.Collections.Generic;
namespace RainForest {
class Program {
static void Main (string[] args) {
Company rainforest = new Company ("Rainforest, LLC");
string[] cities = new string[] { "Austin", "Houston", "Dallas", "San Antonio" };
string[] items = new string[] { "Banana", "Toothpaste", "Baseball", "Laptop" };
@kevincolten
kevincolten / Mastermind.cs
Last active May 16, 2018 02:05
Mastermind in C#
using System;
using System.Collections.Generic;
namespace Mastermind {
class Program {
static void Main (string[] args) {
Game game = new Game (new string[] { "a", "b", "c", "d" });
for (int turns = 10; turns > 0; turns--) {
Console.WriteLine($"You have {turns} tries left");
Console.WriteLine ("Choose four letters: ");
@kevincolten
kevincolten / unused-images.sh
Created April 21, 2018 22:30
find unused images
find ./_images/* |
awk -F/ '{print $NF}' |
sort -u > ./tmp/images.txt &&
grep -IhFriof ./tmp/images.txt --exclude-dir=".git" . |
awk '{print $0}' | sort -u | comm -23 ./tmp/images.txt -
@kevincolten
kevincolten / wordpress-aws.sh
Created April 11, 2018 15:01
Wordpress AWS Notes
aws s3 sync ~/Documents/uploads/ s3://rcrwireless.com/wp-content/uploads
@kevincolten
kevincolten / my.cnf
Created December 17, 2017 07:08
MAMP max_allowed_packet
# This files lives at /MAMP/conf
[mysqld]
max_allowed_packet = 100M
@kevincolten
kevincolten / colors.scss
Last active December 15, 2017 03:10
Color Tachyons
$blue: #0026FF;
$red: #FF0000;
$yellow: #F2FF00;
$colors: (
blue: $blue,
red: $red,
yellow: $yellow
);
@kevincolten
kevincolten / app.js
Last active December 9, 2017 20:47
React TODO
import React, { Component } from 'react';
import { connect, Provider } from 'react-redux';
import { createStore, combineReducers } from 'redux';
import ReactDOM from 'react-dom';
import { ListGroup, ListGroupItem, Card, CardTitle, CardBody, CardFooter } from 'reactstrap';
// +----------------+
// | |
// | ACTIONS |
// | |
@kevincolten
kevincolten / C#.md
Last active November 20, 2017 19:37
@post Up and running with C#