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
| IC : | |
| Jenkins | |
| Sonar | |
| Git : Giblit | |
| Project: | |
| https://github.com/taigaio |
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
| dd if=/dev/zero of=swapfile bs=1024 count=6553600 | |
| mkswap swapfile | |
| swapon swapfile |
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 | |
| start=$1 | |
| end=$2 | |
| command=$3 | |
| outputfile=$4 | |
| delay=10 | |
| rm -rf /tmp/outputToGif 2>/dev/null | |
| mkdir -p /tmp/outputToGif |
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
| #!/usr/bin/env groovy | |
| /*######################################################################*/ | |
| //Configuration | |
| /** username & password for proxy authentication */ | |
| username = "user" | |
| password = "p@zzW0rD" | |
| /** Location of the Proxy configuration file (http://, and file:// urls are supported) */ |
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 get_intersection(line1, line2): | |
| xdiff = (line1[0][0] - line1[1][0], line2[0][0] - line2[1][0]) | |
| ydiff = (line1[0][1] - line1[1][1], line2[0][1] - line2[1][1]) #Typo was here | |
| def det(a, b): | |
| return a[0] * b[1] - a[1] * b[0] | |
| div = det(xdiff, ydiff) | |
| if div == 0: | |
| return None | |
| d = (det(*line1), det(*line2)) | |
| p = det(d, xdiff) / div, det(d, ydiff) / div |
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 simplify_path(p): | |
| direction = p[1][0]-p[0][0], p[1][1]-p[0][1] | |
| yield p[0] | |
| current = p[1] | |
| if len(p)>2: | |
| for pos in p[2:]: | |
| rdir = pos[0]-current[0], pos[1]-current[1] | |
| if direction != rdir: | |
| yield current | |
| current = pos |
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
| FREE_TCP_PORT=`python -c "from socket import*;s=socket(AF_INET,SOCK_STREAM);s.bind(('',0));s.listen(1);print s.getsockname()[1];s.close()"` |
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
| #!/usr/bin/env python2 | |
| # -*- encoding:utf-8 -*- | |
| import sys | |
| import os | |
| import os.path | |
| import smtplib | |
| from email.mime.base import MIMEBase | |
| from email.mime.multipart import MIMEMultipart | |
| from email.mime.text import MIMEText |
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
| /** | |
| * Computes the md5 sum (or lookups from a .md5 file) for the provided file. | |
| * | |
| * @param f file path | |
| * @return the base64ed md5 sum of the file | |
| * @throws IOException | |
| * @throws NoSuchAlgorithmException | |
| * @throws DecoderException | |
| */ | |
| private String getMd5(Path f) throws IOException, NoSuchAlgorithmException, DecoderException { |
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 | |
| set -e | |
| #ADB=`which adb` | |
| ADB=$ANDROID_HOME/platform-tools/adb | |
| TMPMP4=$(mktemp).mp4 | |
| TMPFILE=/sdcard/$(basename $TMPMP4) | |
OlderNewer