Skip to content

Instantly share code, notes, and snippets.

@sjoness
sjoness / move-stashes.md
Created January 13, 2022 20:45 — forked from alexeds/move-stashes.md
Move your stashes from one repo to another

Move your stashes from one repo to another


This was useful for me when we created a new branch for a new major release, but were still working on our current version as well. I cloned our repo again and kept the new project on our new branch, but also wanted to get my stashes there.

Download your stashes

git stash show -p > patch

You'll have to specify your stash and name your file whatevery you want. Do this for as all your stashes, and you'll have patch files in your pwd.

input_dir:
output_dir: {Target}/SwiftGen
xcassets:
inputs: {Target}/Assets.xcassets
outputs:
templateName: swift4
output: Assets.swift
colors:
@sjoness
sjoness / storage.swift
Created September 1, 2016 15:16 — forked from avdyushin/storage.swift
CoreData stack for iOS 9 and iOS 10 using Swift 3
//
// Storage.swift
//
// Created by Grigory Avdyushin on 30.06.16.
// Copyright © 2016 Grigory Avdyushin. All rights reserved.
//
import UIKit
import CoreData
@sjoness
sjoness / -
Created August 18, 2013 16:41
export DATABASE_URL=sqlite:////Users/sam/Code/Sites/nslondon-web/development.sqlite
@sjoness
sjoness / marks.sh
Last active December 21, 2015 05:29
export MARKPATH=$HOME/.marks
function jump {
cd -P $MARKPATH/$1 2>/dev/null || echo "No such mark: $1"
}
function mark {
mkdir -p $MARKPATH; ln -s $(pwd) $MARKPATH/$1
}
function unmark {
rm -i $MARKPATH/$1
}
@sjoness
sjoness / main.c
Last active December 21, 2015 00:28
// Author: Kyle Fuller
#include <windows.h>
#include <shlwapi.h>
#include <string.h>
#define LIST_COUNT 4
char *list[LIST_COUNT] = { "intype", "portable", "opera", "duty" };
BOOL EnumWinProc(HWND hWnd, LPARAM lParam) {
/*
* Author: Sam Jones
* Description: Stack revision
* Created: 18/04/2013
*/
#include <stdio.h>
#include <stdlib.h>
typedef struct node {
-- Filename : middleNumber.hs
-- Version : 1.0
-- Created on : 10/02/2013
-- Last update : 10/02/2013
-- Author : Sam Jones
-- Description : Chapter 6, designing programs in Haskell.
-- re-using the previosuly written maxThree
-- function to figure out and design a way to
-- find the middle value when given 3 integers.
--
#!/bin/bash
HOST="[redacted]"
SSL=false
if test -z "$1"; then
echo "Incorrect usage for $0"
exit 1
fi