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
### | |
# VSFTPD.CONF for virtual users with write/read/delete permissions | |
### | |
anonymous_enable=NO | |
local_enable=YES | |
write_enable=YES | |
local_umask=022 | |
xferlog_enable=YES | |
connect_from_port_20=YES | |
chown_uploads=YES |
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
interface=eth0 | |
address=192.168.0.8 | |
netmask=24 | |
broadcast=192.168.0.255 | |
gateway=192.168.0.1 |
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
#!/usr/bin/env python3 | |
import json, sys, socket | |
import urllib.request | |
try: | |
socket.inet_aton(sys.argv[1]) | |
ip=sys.argv[1] | |
except socket.error: |
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
#!/usr/bin/env python | |
import urllib.request | |
import re, time, os | |
def getIP(): | |
try: | |
with urllib.request.urlopen('http://myip.com.tw/') as f: | |
a = f.read().decode('utf-8') | |
except: |
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
ls > list | |
sed -e "s/^/omnivore.gpx\('velo\/201409\//" list >> list | |
sed -e "s/$/').addTo(map);/" list >> list |
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
// | |
// Geohash.swift | |
// mn_ios | |
// | |
// Created by Alex Bosworth on 11/26/14. | |
// Copyright (c) 2014 adylitica. All rights reserved. | |
// | |
import Foundation | |
import MapKit |
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
class Singleton { | |
class var sharedInstance: Singleton { | |
struct Static { | |
static var token: dispatch_once_t = 0 | |
static var instance: Singleton! | |
} | |
dispatch_once(&Static.token) { | |
Static.instance = Singleton() | |
} | |
return Static.instance |
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://on4wp7.codeplex.com/SourceControl/changeset/view/21483#353936 | |
// | |
// Copyright (C) 1000 - 9999 Somebody Anonymous | |
// NO WARRANTY OR GUARANTEE | |
// | |
using System; | |
namespace Navi |
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
// http://stackoverflow.com/questions/993280/how-to-detect-when-a-uiscrollview-has-finished-scrolling | |
func scrollViewDidScroll(scrollView: UIScrollView) { | |
performSelector(#selector(UIScrollViewDelegate.scrollViewDidEndScrollingAnimation(_:)), withObject: nil, afterDelay: 0.3) | |
} | |
func scrollViewDidEndScrollingAnimation(scrollView: UIScrollView) { | |
print("scrollViewDidEndDecelerating") | |
NSObject.cancelPreviousPerformRequestsWithTarget(self) |
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
Scene: The cafeteria. | |
Sheldon: Hey, would you like to hear some songs I’ve rewritten to get children interested in the hard sciences? | |
Howard: Sure. | |
Leonard: Really? | |
Howard: Yeah. Well, I like music, I like science, I like making fun of Sheldon. Hit it. |
OlderNewer