Skip to content

Instantly share code, notes, and snippets.

View jessedc's full-sized avatar

Jesse Collis jessedc

View GitHub Profile
@jessedc
jessedc / iOS Icon.png bash script
Last active February 25, 2018 03:02
A simple bash script using OSX command line tool sips to resample a 1024x1024 image
#!/bin/bash
f=$(pwd)
sips --resampleWidth 512 "${f}/${1}" --out "${f}/iTunesArtwork"
sips --resampleWidth 1024 "${f}/${1}" --out "${f}/iTunesArtwork@2x"
sips --resampleWidth 57 "${f}/${1}" --out "${f}/Icon.png"
sips --resampleWidth 114 "${f}/${1}" --out "${f}/Icon@2x.png"
sips --resampleWidth 29 "${f}/${1}" --out "${f}/Icon-Small.png"
sips --resampleWidth 58 "${f}/${1}" --out "${f}/Icon-Small@2x.png"
sips --resampleWidth 50 "${f}/${1}" --out "${f}/Icon-Small-50.png"
@jessedc
jessedc / php_on_osx.mdown
Last active September 28, 2017 22:13
PHP setup instructions OSX 1.8 Mountain Lion

Setting up PHP on Mountain Lion from scratch

Editing text files from the command line is made easier with TextMate with it's command line extension mate OR Sublime text2 with command line extensions. However the built in nano text editor is easy to use as well.

Some guidance gleaned form from coolestguyplanettech.com

Change permissions on /Library/WebServer/Documents so all users can write to it

sudo chmod -R o+w /Library/WebServer/Documents
@jessedc
jessedc / compiled.html
Created April 25, 2011 12:19
Jade Example for Steve
<html lang="en">
<head>
<title>
title of the page
</title>
<link rel="stylesheet" type="text/css" href="/stylesheets/style.css">
</head>
<body>
<h1>
title of the post
@jessedc
jessedc / CountryCodes.swift
Created September 1, 2016 06:26
Fetch all of the Countries supported in UIKit
//: Playground - noun: a place where people can play
import UIKit
// If you're in a playground, you need to swizzle current locale
extension NSLocale {
class func jc_currentLocale() -> NSLocale {
return NSLocale.init(localeIdentifier: "en_AU")
}
}
@jessedc
jessedc / ObsidianCode.dvtcolortheme
Last active April 20, 2016 09:22 — forked from subdigital/ObsidianCode.dvtcolortheme
Obsidian Code Theme for Xcode 4
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DVTConsoleDebuggerInputTextColor</key>
<string>0 0 0 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>Menlo-Bold - 11.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>
<string>0 0 0 1</string>
- (void)scrollViewDidZoom:(UIScrollView *)scrollView
{
[self updateZoomableViewCenter:scrollView];
}
- (void)updateZoomableViewCenter:(UIScrollView *)scrollView
{
CGSize scrollViewSize = scrollView.bounds.size;
CGSize contentSize = scrollView.contentSize;
@jessedc
jessedc / CSGO.mdown
Created February 2, 2013 23:23
CSGO Dedicated Server Configuration

List of configuration options

[Valve's GSGO Dedicated Server Page][2]

Running the game:

srcds -game csgo -console -usercon +game_type 1 +game_mode 0 +mapgroup mg_armsrace +map ar_shoots

Valid Schema

{
  "swagger": "2.0",
  "info": {
    "version": "2.0.0",
    "title": "Beanhunter API",
    "description": "Description of the api goes here."
  },
@jessedc
jessedc / gist:3462508
Last active October 9, 2015 07:37
TF2 Dedicated Server

TF2 Wiki - linux dedicated server

update the game ./steam -command update -game tf -dir .

run the game ./srcds_run -game tf +map cp_badlands

  • [Here's a list of the maps][2] (scroll to bottom)
@jessedc
jessedc / Genstrings.sh
Created July 16, 2012 00:12
genstrings
genstrings -s JCLocalizedString -q -o localization [files]
genstrings -s JCLocalizedString -q -a -o localization [files]