Skip to content

Instantly share code, notes, and snippets.

@hgsan
hgsan / Correct pip install command.sh
Last active March 20, 2017 15:54
Correct pip install command
curl -kL https://bootstrap.pypa.io/get-pip.py | sudo python
Permission denied - /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-15
@hgsan
hgsan / Pip install warning with installing path
Last active March 20, 2017 15:49
Pip install warning with installing path
You're using an outdated location for the get-pip.py script, please use the one available from https://bootstrap.pypa.io/get-pip.py
Installing collected packages: pip, wheel
Exception:
Traceback (most recent call last):
File "/var/folders/jp/w42t18ld4111wgg57dw4jflw0000gn/T/tmpqokvBP/pip.zip/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/var/folders/jp/w42t18ld4111wgg57dw4jflw0000gn/T/tmpqokvBP/pip.zip/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/var/folders/jp/w42t18ld4111wgg57dw4jflw0000gn/T/tmpqokvBP/pip.zip/pip/req/req_set.py", line 784, in install
**kwargs
File "/var/folders/jp/w42t18ld4111wgg57dw4jflw0000gn/T/tmpqokvBP/pip.zip/pip/req/req_install.py", line 851, in install
sudo pip install awscli --ignore-installed six
Installing collected packages: six
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 784, in install
**kwargs
File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 851, in install
@hgsan
hgsan / Temporary sync comamnd
Last active March 20, 2017 15:48
Temporary sync comamnd
npm run build && aws s3 sync build/ s3://your-bucket-name
@hgsan
hgsan / ScrollViewAndPageControlViewContoller.swift
Last active May 16, 2019 05:29
manage UIPageControl and UIScrollView with RxSwift
@IBOutlet weak var pageControll: UIPageControl!
@IBOutlet weak var scrollView: UIScrollView!
var scrollViewPageIndex :Int {
set {
let contentX = scrollView.width * CGFloat(newValue)
DispatchQueue.main.async {
UIView.animate(withDuration: 0.2, animations: { [weak self] _ in
self?.scrollView.contentOffset = CGPoint.init(x: contentX, y: 0)
})