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 python | |
| class Point(object): | |
| def __init__(self, _x, _y, _order = None): self.x, self.y, self.order = _x, _y, _order | |
| def calc(self, top, bottom, other_x): | |
| l = (top * inverse_mod(bottom)) % p | |
| x3 = (l * l - self.x - other_x) % p | |
| return Point(x3, (l * (self.x - x3) - self.y) % p) |
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 | |
| if [ $# -eq 0 ]; then | |
| echo "USAGE: $0 plugin1 plugin2 ..." | |
| exit 1 | |
| fi | |
| plugin_dir=/var/lib/jenkins/plugins |
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
| package main | |
| import ( | |
| "net" | |
| "fmt" | |
| "io" | |
| "os" | |
| ) | |
| func main() { | |
| if len(os.Args) != 3 { | |
| fatal("usage: netfwd local remote") |
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
| var cv = document.getElementById('cv'); | |
| var c = cv.getContext('2d'); | |
| var txtDiv = document.getElementById('txt'); | |
| var fileBtn = document.getElementById("up-button"); | |
| var img = new Image(); | |
| img.src = 'a.jpg'; | |
| img.onload = init; // 图片加载完开始转换 | |
| fileBtn.onchange = getImg; | |
| // 根据灰度生成相应字符 |
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
| sudo -i | |
| cd | |
| apt-get install build-essential checkinstall && apt-get build-dep imagemagick -y | |
| wget http://www.imagemagick.org/download/ImageMagick-6.8.7-7.tar.gz | |
| tar xzvf ImageMagick-6.8.9-1.tar.gz | |
| cd ImageMagick-6.8.9-1/ | |
| ./configure --prefix=/opt/imagemagick-6.8 && make | |
| checkinstall |