Skip to content

Instantly share code, notes, and snippets.

View nataliachodelski's full-sized avatar

Natalia Chodelski nataliachodelski

View GitHub Profile
@tsiege
tsiege / gist:9214464
Created February 25, 2014 18:09
My bash profile
export PATH="$HOME/.rbenv/bin:$PATH"
export ZSH=$HOME/.oh-my-zsh
source ~/.git-prompt.sh
export GIT_PS1_SHOWDIRTYSTATE=1
# Configuring Our Prompt
@nonamelive
nonamelive / DMNavigationController.m
Last active April 21, 2023 06:56
Prevent UINavigationController from pushing two view controllers at the same time in case of stack inconsistency and crashes
@interface UINavigationController (DMNavigationController)
- (void)didShowViewController:(UIViewController *)viewController animated:(BOOL)animated;
@end
@interface DMNavigationController ()
@property (nonatomic, assign) BOOL shouldIgnorePushingViewControllers;
@nickbauman
nickbauman / ios_imperatives_for_approval.md
Last active November 1, 2019 12:10
Condensed iOS Human Interface Guidelines, formulated as imperatives.

Condensed iOS Human Interface Guidelines

Imperatives for AppStore approval

For iPhone app developers. Emphasis on getting the fastest app store approval. Everything stated as suggestion made into an imperative. When "violating" these imperatives, you can check for yourself what the caveats are. Generally speaking, deviating will more likely cause your app to be hung up in approval.

You can read this entire document in about 20 minutes. This is faster than reading and understanding the entire Human Interface Guidelines.

Overview

@herveguetin
herveguetin / autoshipping.php
Last active October 17, 2017 07:04
Set shipping method and rate if they do not exist yet in Magento
<?php
/**
* Has shipping been applied to quote?
*
* @var bool
*/
protected $_hasShipping = false;
/**
@stigi
stigi / CocoaLumberjack.swift
Created August 16, 2014 21:41
A little hack to work comfortably with cocoa lumberjack in Swift.
// Created by Ullrich Schäfer on 16/08/14.
// Bitmasks are a bit tricky in swift
// See http://natecook.com/blog/2014/07/swift-options-bitmask-generator/
//enum LogFlag: Int32 {
// case Error = 0b1
// case Warn = 0b10
// case Info = 0b100
@urish
urish / ng2-hello-world.md
Last active November 22, 2015 00:33
AngularJS 2.0 Hello World How To
  1. Clone the AngularJS 2.0 source tree:

    git clone https://github.com/angular/angular

  2. inside the project directory, run npm install

  3. inside gulpfile.js, replace the 'build' task (near the end of the file) with the following one:

    gulp.task('build', ['jsRuntime/build', 'modules/build.dev.js']);

@jackreichert
jackreichert / getKeyVals
Last active March 19, 2020 07:12
This is a swift extension for NSURL so you can parse the query string and get back a dictionary of the variables.
extension NSURL {
func getKeyVals() -> Dictionary<String, String>? {
var results = [String:String]()
var keyValues = self.query?.componentsSeparatedByString("&")
if keyValues?.count > 0 {
for pair in keyValues! {
let kv = pair.componentsSeparatedByString("=")
if kv.count > 1 {
results.updateValue(kv[1], forKey: kv[0])
}

Full Stack Entrance Quiz

Audience: Students who haven't completed the Front End Web Development course but have equivalent experience and want to figure out if they are ready for the Full Stack course.

Tasks

  1. Create a HTML page which uses JavaScript (jQuery is fine) to print the numbers from 1 to 100 as elements in an unordered list.
  2. Using CSS, make every other item in the list (eg. all even numbers) have a different background color.
  3. Write a Python program which asks the user for their name and prints out their 'hacker' name. Their hacker name is a randomly capitalized, space-free version of their name, with letters replaced by numbers according to the following scheme:

Full Stack Pre-Work

Audience: Students who are looking to brush up on the necessary skills needed to succeed in the Hackbright Academy Full-Stack Web Development Course.

Terminal skills

Goal: Be comfortable navigating the command line, including changing directory, moving files, and using command-line utilities such as curl.

@acegreen
acegreen / Swift 2.0 Error Handling Asynchronous Functions
Last active November 1, 2016 04:34
Swift 2.0 Error Handling Asynchronous Functions
**** Medium Story ****
https://medium.com/ios-os-x-development/logan-wright-i-just-started-dabbling-with-swift-s-error-handling-myself-5e7b3dffdf06#.zbor79r8l
public enum Errors: ErrorType {
case NoInternetConnection
case QueryResponseError
case ErrorQueryingForData
case QueryDataEmpty
public func message() -> String {