This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Automatically adds JIRA ticket ID based on branch name to every commit message. | |
# | |
set -x | |
MESSAGE=$(cat "$1") | |
BASEREGEX="([A-Z]{1,10}-[0-9]*)" | |
MSG_REGEX=$BASEREGEX | |
if [[ $MESSAGE =~ $MSG_REGEX ]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Podfile post_install hack which removes the beta suffix from version in info.plist to fix AppStore validation | |
# Credit to jerolimov comment https://github.com/ReactiveX/RxSwift/issues/206#issuecomment-158074615 | |
post_install do |installer| | |
plist_buddy = "/usr/libexec/PlistBuddy" | |
installer.pods_project.targets.each do |target| | |
plist = "Pods/Target Support Files/#{target}/Info.plist" | |
original_version = `#{plist_buddy} -c "Print CFBundleShortVersionString" "#{plist}"`.strip | |
changed_version = original_version[/(\d+\.){1,2}(\d+)?/] | |
unless original_version == changed_version | |
puts "Fix version of Pod \"#{target}\": #{original_version} => #{changed_version}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSUInteger PSPDFHashFromCGRect(CGRect rect) { | |
return (*(NSUInteger *)&rect.origin.x << 10 ^ *(NSUInteger *)&rect.origin.y) + (*(NSUInteger *)&rect.size.width << 10 ^ *(NSUInteger *)&rect.size.height); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)viewWillAppear:(BOOL)animated { | |
[super viewWillAppear:animated]; | |
[[NSNotificationCenter defaultCenter] | |
addObserver:self | |
selector:@selector(keyboardWillChangeFrame:) | |
name:UIKeyboardWillChangeFrameNotification object:nil]; | |
} | |
- (void)viewDidDisappear:(BOOL)animated { | |
[super viewDidDisappear:animated]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Updating xcode-install | |
Fetching: xcode-install-2.2.1.gem (100%) | |
/Users/antonmatosov/.rbenv/versions/2.2.6/lib/ruby/gems/2.2.0/gems/xcode-install-2.2.1/bin/🎉 maybe `gem pristine xcode-install` will fix it? | |
Successfully installed xcode-install-2.2.1 | |
antonmatosov@Antons-MBP ~/> gem pristine xcode-install | |
Restoring gems to pristine condition... | |
/Users/antonmatosov/.rbenv/versions/2.2.6/lib/ruby/gems/2.2.0/gems/xcode-install-2.1.1/bin/🎉 maybe `gem pristine xcode-install` will fix it? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://snack.expo.io/HynFGjcyf | |
import React, { Component } from 'react'; | |
import { | |
StyleSheet, | |
Text, | |
View, | |
Easing, | |
Animated, | |
// Button, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
# import matplotlib | |
# matplotlib.use('Agg') | |
import matplotlib.pyplot as plt | |
from matplotlib import animation, rc | |
from IPython.display import HTML, Image | |
import seaborn # for background grid | |
seaborn.set() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stackargs=$@ | |
shbin="$(which sh)" | |
if [ -z "$shbin" ] || [[ "$shbin" =~ "not found" ]]; then | |
echo "Couldn't find sh, exiting." | |
exit 1 | |
else | |
echo "Found sh: $shbin" | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ pandoc -s -f markdown -t man README.md | man -l - | |
$ pandoc -s -f markdown -t html README.md |lynx -dump -stdin | less - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I've tested it on Fedora 23 and Ubuntu 16.04. I'm using gcc-5.3.1, python-3.4, VS Code-1.14.0 | |
You can debug mixed Python/C++ in the same GUI. It also works for MPI applications. You can switch between the debuggers and corresponding call stacks. | |
1. Packages needed | |
1) Visual Studio Code | |
2) Extensions for VS Code: | |
"Python" from Don Jayamanne (I'm using 0.6.7) | |
This allows VS Code act as the front end to debug python. | |
This gives VS Code ability to attach to a python script that uses module "ptvsd". |
OlderNewer