Skip to content

Instantly share code, notes, and snippets.

@MrSchMax
MrSchMax / duplicate_line_xcode.md
Created April 9, 2019 09:02 — forked from emotality/duplicate_line_xcode.md
Xcode - Duplicate Line key binding

Xcode line duplicate

Bind keys to duplicate lines in Xcode

  1. Open below directory in Finder with Cmnd + Shift + G
/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources/
@MrSchMax
MrSchMax / .gitignore
Created January 17, 2017 13:46
.gitignore for AppCode-projects (includes OS X & Xcode)
# -------------------------
# OS X
# -------------------------
.DS_Store
.AppleDouble
.LSOverride
# Temp files
*~
@MrSchMax
MrSchMax / shuffle.swift
Last active July 26, 2016 17:16 — forked from natecook1000/shuffle.swift
Shuffle/shuffled functions & Array extensions
// (c) 2014 Nate Cook, licensed under the MIT license
//
// Fisher-Yates shuffle as top-level functions and array extension methods
/// Shuffle the elements of `list`.
func shuffle<C: MutableCollectionType where C.Index == Int>(inout list: C) {
let c = count(list)
for i in 0..<(c - 1) {
let j = Int(arc4random_uniform(UInt32(c - i))) + i
swap(&list[i], &list[j])
@MrSchMax
MrSchMax / app.swift
Created April 21, 2016 17:01 — forked from lmrco/app.swift
swift osx application without nib
import Cocoa
class AppDelegate: NSObject, NSApplicationDelegate {
let app: NSApplication
let controller: NSWindowController
init(app: NSApplication) {
self.app = app
self.controller = NiblessWindowController()
/*
DS.attr('object')
*/
App.ObjectTransform = DS.Transform.extend({
deserialize: function(value) {
if (!$.isPlainObject(value)) {
return {};
} else {
return value;
}
@MrSchMax
MrSchMax / array.js
Last active August 29, 2015 14:17 — forked from NuckChorris/array.js
// app/transforms/array.js
import Ember from 'ember';
import DS from 'ember-data';
export default DS.Transform.extend({
deserialize: function(value) {
if (Ember.isArray(value)) {
return Ember.A(value);
} else {
return Ember.A();
push = (element) -> (stack) ->
newStack = [element].concat stack
{value: element, stack: newStack}
pop = (stack) ->
element = stack[0]
newStack = stack.slice 1
{value: element, stack: newStack}
bind = (stackOperation, continuation) -> (stack) ->
package com.javarush.test.level17.lesson10.bonus01;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Locale;
/* CRUD
CrUD - Create, Update, Delete