Skip to content

Instantly share code, notes, and snippets.

vahotm

Block or report user

Report or block vahotm

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mlynch
mlynch / info.plist
Last active Jun 20, 2019
Disable App Transport Security in iOS 9
View info.plist
<!--
This disables app transport security and allows non-HTTPS requests.
Note: it is not recommended to use non-HTTPS requests for sensitive data. A better
approach is to fix the non-secure resources. However, this patch will work in a pinch.
To apply the fix in your Ionic/Cordova app, edit the file located here:
platforms/ios/MyApp/MyApp-Info.plist
And add this XML right before the end of the file inside of the last </dict> entry:
@Daemon-Devarshi
Daemon-Devarshi / PasteboardWatcher.swift
Last active May 4, 2019
A class which performs polling to determine the newly copied url of desired kind in an external app
View PasteboardWatcher.swift
//
// PasteboardWatcher.swift
// PasteboardWatcher
//
// Created by Devarshi Kulshreshtha on 6/19/15.PasteboardWatcher
// Copyright © 2015 Devarshi Kulshreshtha. All rights reserved.
//
import Cocoa
@lttlrck
lttlrck / gist:9628955
Created Mar 18, 2014
rename git branch locally and remotely
View gist:9628955
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@neonichu
neonichu / update_xcode_plugins
Last active May 28, 2018
Update DVTPlugInCompatibilityUUIDs for installed plugins from Xcode 5.1 beta to final
View update_xcode_plugins
#!/bin/sh
#ID='A16FF353-8441-459E-A50C-B071F53F51B7' # Xcode 6.2
ID='992275C1-432A-4CF7-B659-D84ED6D42D3F' # Xcode 6.3
PLIST_BUDDY=/usr/libexec/PlistBuddy
function add_compatibility() {
"$PLIST_BUDDY" -c "Add DVTPlugInCompatibilityUUIDs:10 string $2" \
"$1/Contents/Info.plist"
@joeblau
joeblau / git yolo
Created Feb 3, 2014
git yolo command
View git yolo
alias gityolo='git commit -am "DEAL WITH IT" && git push -f origin master'
@pythonicrubyist
pythonicrubyist / nil_empty_blank_present_ffdierence_in_ruby
Last active Jul 18, 2019
Difference between nil?, empty?, blank? and present? in Ruby and Ruby on Rasils.
View nil_empty_blank_present_ffdierence_in_ruby
# nil? can be used on any Ruby object. It returns true only if the object is nil.
nil.nil? # => true
[].nil? # => false
{}.nil? # => false
"".nil? # => false
" ".nil? # => false
true.nil? # => false
# empty? can be used on some Ruby objects including Arrays, Hashes and Strings. It returns true only if the object's length is zero.
nil.empty? # NoMethodError: undefined method `empty?' for nil:NilClass
You can’t perform that action at this time.