Skip to content

Instantly share code, notes, and snippets.

Ken Wilcox kenwilcox

  • Idaho
Block or report user

Report or block kenwilcox

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
View fizz buzz.swift
var counter = [
"fizz": 0,
"buzz": 0,
"fizzbuzz": 0,
"numbers": 0
for i in 1...100 {
switch i {
case let x where (x % 3) == 0 && (x % 5) == 0:
kenwilcox / gist:796f035fbe1a579e4a2c8489aeacdfc3
Created Sep 11, 2016 — forked from adamstac/gist:8347083
Enable HiDPI mode on a VMware Fusion OS X 10.9 Mavericks Vagrant VM
View gist:796f035fbe1a579e4a2c8489aeacdfc3
  1. Set "Use full resolution for Retina display" in the VM's Settings > Display
  2. Run this command in Terminal sudo defaults write /Library/Preferences/ DisplayResolutionEnabled -bool true
  3. In System Preferences, set the display to "scaled" using the resolution 1292 x 807 (HiDPI)
  4. Enjoy.
View AddSlash.markdown

AddSlash ('-' * 8) Wanted to create a function that added a slash to a url path, but only if it was needed. Also wanted it to be able to ignore any query string items

A Pen by kenwilcox on CodePen.


kenwilcox /
Last active Aug 29, 2015
Building Alamofire framework for app distribution

Yesterday I was playing with Carthage for the first time. I got Alamofire to download and build in the simulator just fine.

However, when I tried to upload it to iTunes Connect it failed with PIE errors, invalid iOS min version... and something else, I don't remember...

What I did to get it to work:

  • Opened up the Alamofire workspace that Carthage downloaded for me.
  • On the project tab set the deployment target to 8.0
  • In Info.plist added MinimumOSVersion, string value of 8.0
  • Saved the project
  • Opened terminal to the Carthage/Checkouts/Alamofire directory
View emmet-examples
div#main.container>h1+table>tr.rows*4>td.cols*6>{Item $}^p
View ViewController.swift
import UIKit
import QuartzCore
class ViewController: UIViewController {
@IBOutlet weak var label: UILabel
@IBOutlet weak var counter: UILabel
override func viewDidLoad() {
View gist:ce4da86f7264a85ff848
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Win32;
using System.Windows.Forms;
namespace FixIE
public class IEEmulation
# Some things taken from here
# Set the colours you can use
View Pred
using System;
using System.Collections.Generic;
namespace Pred
public class Pred
static void Main()
List<string> list = new List<string>();
You can’t perform that action at this time.