You can post a json file with curl like so:
curl -X POST -H "Content-Type: application/json" -d @FILENAME DESTINATION
so for example:
| #!/bin/bash | |
| # Usage: slackpost <token> <channel> <message> | |
| # Enter the name of your slack host here - the thing that appears in your URL: | |
| # https://slackhost.slack.com/ | |
| slackhost=PUT_YOUR_HOST_HERE | |
| token=$1 |
| # taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
| # generate server.xml with the following command: | |
| # openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes | |
| # run as follows: | |
| # python simple-https-server.py | |
| # then in your browser, visit: | |
| # https://localhost:4443 | |
| import BaseHTTPServer, SimpleHTTPServer | |
| import ssl |
| ZIP,LAT,LNG | |
| 00601,18.180555, -66.749961 | |
| 00602,18.361945, -67.175597 | |
| 00603,18.455183, -67.119887 | |
| 00606,18.158345, -66.932911 | |
| 00610,18.295366, -67.125135 | |
| 00612,18.402253, -66.711397 | |
| 00616,18.420412, -66.671979 | |
| 00617,18.445147, -66.559696 |
| from subprocess import Popen, PIPE | |
| from time import sleep | |
| # run the shell as a subprocess: | |
| p = Popen(['python', 'shell.py'], | |
| stdin = PIPE, stdout = PIPE, stderr = PIPE, shell = False) | |
| # issue command: | |
| p.stdin.write('command\n') | |
| # let the shell output the result: | |
| sleep(0.1) |
| #! /bin/bash | |
| # | |
| # Diffusion youtube avec ffmpeg | |
| # Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée. | |
| VBR="2500k" # Bitrate de la vidéo en sortie | |
| FPS="30" # FPS de la vidéo en sortie | |
| QUAL="medium" # Preset de qualité FFMPEG | |
| YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube |
| #!/bin/bash | |
| # | |
| # Bash script to setup headless Selenium (uses Xvfb and Chrome) | |
| # (Tested on Ubuntu 12.04) trying on ubuntu server 14.04 | |
| # Add Google Chrome's repo to sources.list | |
| echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee -a /etc/apt/sources.list | |
| # Install Google's public key used for signing packages (e.g. Chrome) | |
| # (Source: http://www.google.com/linuxrepositories/) |
| import sys, os.path, hashlib, re | |
| import zipfile | |
| import subprocess | |
| from StringIO import StringIO | |
| from io import BytesIO | |
| # | |
| # Passbook Hack | |
| # David Schuetz | |
| # 30 May 2014 |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
EMOJI CHEAT SHEET
Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. ✈ Got flash enabled? Click the emoji code and it will be copied to your clipboard.
People
😄