This file contains hidden or 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
| /** | |
| * The first commented line is your dabblet’s title | |
| */ | |
| background: linear-gradient(45deg, #f06, gold); | |
| background: border-radius(10px); | |
| /*background-image:url("http://images.apple.com/macosx/mountain-lion/images/overview_mountainlion.png");*/ | |
| /*min-height:100%;*/ |
This file contains hidden or 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 os, random, string | |
| length = 16 | |
| chars = string.ascii_letters + string.digits + '!@#$%^&*()' | |
| random.seed = (os.urandom(1024)) | |
| print ''.join(random.choice(chars) for i in xrange(length)) |
This file contains hidden or 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 | |
| # LoopBomb.sh | |
| # SliderLab | |
| # | |
| # Created by tanxin on 4/2/13. | |
| # | |
| tell application "Messages" | |
| set theBuddy to buddy "[email protected]" |
This file contains hidden or 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
| def fib_recursion(n): | |
| if n >= 0 and n < 2: | |
| return 1 | |
| else: | |
| return fib_recursion(n-1)+fib_recursion(n-2) | |
| def fib(): | |
| x, y = 0,1 | |
| while True: | |
| yield x |
This file contains hidden or 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 | |
| # | |
| # MongoDB OSX Launch Item | |
| # | |
| # usage: sudo ./install.sh | |
| # | |
| # initialize | |
| DAEMON_PATH=`which mongod` |
This file contains hidden or 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/bash | |
| while true;do | |
| read -p "Enter an integer:" num搜索 | |
| if [ $num -eq 100 ];then | |
| break | |
| fi | |
| done | |
| exit 0 |
This file contains hidden or 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 | |
| # (POSIX shell syntax) | |
| # Reset all variables that might be set | |
| file= | |
| verbose=0 | |
| while :; do | |
| case $1 in | |
| -h|-\?|--help) # Call a "show_help" function to display a synopsis, then exit. |
This file contains hidden or 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 Solution(object): | |
| def reverse(self, x): | |
| signal = 1 if x > 0 else -1 | |
| x = abs(x) | |
| if x > 0: | |
| x = "".join(list(str(x))[::-1]) | |
| if 2 ** 31 -1 >= signal * int(x) >= -2 ** 31 +1: | |
| return signal * int(x) | |
| else: | |
| return 0 |
This file contains hidden or 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
| body { padding-bottom: 40px; padding-top: 55px;}.sidebar-nav-fixed { width:13%;} |
This file contains hidden or 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
| body { padding-bottom: 40px; padding-top: 55px;}.sidebar-nav-fixed { width:13%;} |