Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| #/usr/local/swift/lib/swift/linux/libswiftCore.so | |
| #/usr/lib/x86_64-linux-gnu/libicuuc.so.52 | |
| #/usr/lib/x86_64-linux-gnu/libicui18n.so.52 | |
| #/usr/lib/x86_64-linux-gnu/libicudata.so.52 | |
| curl --upload-file /usr/local/swift/lib/swift/linux/libswiftCore.so https://transfer.sh/libswiftCore.so | |
| curl --upload-file /usr/lib/x86_64-linux-gnu/libicuuc.so.52 https://transfer.sh/libicuuc.so.52 | |
| curl --upload-file /usr/lib/x86_64-linux-gnu/libicui18n.so.52 https://transfer.sh/libicui18n.so.52 | |
| curl --upload-file /usr/lib/x86_64-linux-gnu/libicudata.so.52 https://transfer.sh/libicudata.so.52 |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| import os | |
| import random | |
| import platform | |
| try: | |
| from msvcrt import getch #For windows | |
| except ImportError: #For linux and maybe mac... | |
| def getch(): | |
| import sys, tty, termios | |
| fd = sys.stdin.fileno() |
| import UIKit | |
| class AutoResizingTextViewController: UIViewController, UITextViewDelegate { | |
| lazy var contentView = UIView(frame: CGRect.zero) | |
| lazy var textViewContainer = UIView(frame: CGRect.zero) | |
| lazy var textView = UITextView(frame: CGRect.zero) | |
| override func loadView() { | |
| super.loadView() |
| throw new RuntimeException("This is a forced crash"); |
| #!/bin/bash | |
| # Installs Android Studio configs into your user configs. | |
| echo "Installing code style configs..." | |
| for i in $HOME/Library/Preferences/AndroidStudio* | |
| do | |
| if [ -d $i ]; then | |
| mkdir -p $i/codestyles | |
| cp -frv ivanfoong.xml $i/codestyles |
| func delay(delay:Double, closure:()->()) { | |
| dispatch_after( | |
| dispatch_time( | |
| DISPATCH_TIME_NOW, | |
| Int64(delay * Double(NSEC_PER_SEC)) | |
| ), | |
| dispatch_get_main_queue() | |
| , closure | |
| ) | |
| } |
| //RGB color macro | |
| #define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0] | |
| //RGB color macro with alpha | |
| #define UIColorFromRGBWithAlpha(rgbValue,a) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:a] | |
| UIColor *color = UIColorFromRGB(0xCECECE); | |
| UIColor *color2 = UIColorFromRGB(0xCECECE, 0.8); |
| require 'open-uri' | |
| remote_ip = open('http://whatismyip.akamai.com').read | |
| p remote_ip |