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/4212861/what-is-a-correct-mime-type-for-docx-pptx-etc | |
// https://technet.microsoft.com/en-us/library/ee309278(office.12).aspx | |
import Dropzone from 'react-dropzone'; | |
import Button from 'react-bootstrap/lib/Button'; | |
const acceptedMimeTypes = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"; | |
... |
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
def main(): | |
packet = "|dc|ef|09|b0|e8|ba|ac|bc|32|91|f2|93|08|00|45|00|00|68|d8|73|40|00|40|06|4a|cd|c0|a8|01|07|95|38|c0|67|f5|62|0b|b9|3a|03|1d|1d|8f|c2|52|1d|80|18|10|15|64|61|00|00|01|01|08|0a|4e|2a|51|99|00|e4|c8|7e|03|00|00|34|2f|e0|00|00|00|00|00|43|6f|6f|6b|69|65|3a|20|6d|73|74|73|68|61|73|68|3d|67|6c|6f|77|63|6c|6f|75|64|5c|66|72|65|64|0d|0a|01|00|08|00|0b|00|00|00|" | |
packet = ''.join(packet.split('|')) | |
print packet.decode("hex") | |
if __name__ == '__main__': | |
main() |
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
import tornado.web | |
import tornado.escape | |
import tornado.ioloop | |
def main(): | |
application = tornado.web.Application([ | |
(r'/data', DataHandler), | |
(r'/ping', PingHandler) | |
]) |
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/107701/how-can-i-remove-ds-store-files-from-a-git-repository | |
find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch |
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
<!-- The missing piece for: https://github.com/stimulsoft/Samples-JS/tree/master/Node.js/04.%20Start%20SQL%20Adapters%20from%20Http%20Server --> | |
<html> | |
<head> | |
<link href="stimulsoft.viewer.office2013.css" rel="stylesheet"> | |
</head> | |
<body> | |
<h4>Hello World</h4> | |
<script src="stimulsoft.reports.js" type="text/javascript"></script> |
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://www.sql-server-helper.com/sql-server-2008/convert-latitude-longitude-to-geography-point.aspx | |
UPDATE [Table1] | |
SET [GeoLocation] = geography::STPointFromText('POINT(' + CAST([Longitude] AS VARCHAR(20)) + ' ' + CAST([Latitude] AS VARCHAR(20)) + ')', 4326) |
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
## If error installing ffmpeg = "yasm/nasm not found or too old" | |
## http://www.sthshare.com/wordpress/yasmnasm-not-found-or-too-old-on-linux-servercenots.html | |
# wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz | |
# tar -xvf yasm-1.3.0.tar.gz | |
# cd yasm-1.3.0 | |
# ./configure | |
# make | |
# make install | |
## http://superuser.com/questions/160443/software-to-speed-up-playback-of-mp4-files |
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
# cd to this directory | |
weasyprint index.html report.pdf |
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
from fpdf import FPDF | |
PORTRAIT_FULL_WIDTH = 190 | |
LANDSCAPE_FULL_WIDTH = 277 | |
MAX_ROWS = 57 | |
LEFT_MARGIN = 10.00125 | |
pdf = None | |
def main(): | |
global pdf |
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
import os | |
import glob | |
import time | |
import shutil | |
def main(): | |
appPath = '/etc/appName' | |
date = str(int(time.time())) | |
folders = glob.glob('staging/*') |