Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
//viewDidload | |
if ([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)]) { | |
// iOS 7 | |
[self prefersStatusBarHidden]; | |
[self performSelector:@selector(setNeedsStatusBarAppearanceUpdate)]; | |
} else { | |
// iOS 6 | |
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide]; | |
} |
from django.template.defaultfilters import slugify | |
from django.contrib.sites.models import Site | |
from django.core.files import File | |
from taggit.models import Tag | |
from .models import Photo | |
import factory | |
import os | |
TEST_MEDIA_PATH = os.path.join(os.path.dirname(__file__), 'tests', 'test_media') | |
TEST_PHOTO_PATH = os.path.join(TEST_MEDIA_PATH, 'test_photo.png') |
#!/usr/bin/env ruby | |
require 'tempfile' | |
require 'fileutils' | |
# Signals | |
trap("SIGINT") { exit } | |
# Setup | |
TARGET_FOLDER = ARGV[0] | |
TARGET_URL = ARGV[1] |
#!/bin/bash | |
# Define colors | |
alias_color='\033[1;34m' # Bold blue | |
comment_color='\033[0;32m' # Green | |
no_color='\033[0m' # Reset color | |
printf "\nGit Aliases\n" | |
# Define the number of spaces for alignment |
# the following two lines give a two-line status, with the current window highlighted | |
hardstatus alwayslastline | |
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]' | |
# huge scrollback buffer | |
defscrollback 5000 | |
# no welcome message | |
startup_message off |
#GNU Screen Cheat Sheet
##Basics
- (void)setupiPodPlayer; | |
{ | |
if (!self.ipodPlayer) { | |
self.ipodPlayer = [MPMusicPlayerController iPodMusicPlayer]; | |
// Register for music player notifications | |
NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; | |
[notificationCenter addObserver:self | |
selector:@selector(handleNowPlayingItemChanged:) |