An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
package controllers; | |
import play.*; | |
import play.data.Upload; | |
import play.db.Model.BinaryField; | |
import play.libs.MimeTypes; | |
import play.mvc.*; | |
import java.io.ByteArrayInputStream; | |
import java.io.ByteArrayOutputStream; |
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
/* | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2014 Matthieu Harlé | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |
To remove a submodule you need to:
// If you Service with threads, e.g. a Chat Service | |
// You want to show a toast such as indicating the connection is lost or stuff when your service is running foreground | |
// Get main the main thread, you are only allowed to draw UI in the main thread | |
Handler mainHandler = new Handler(getMainLooper()); | |
mainHandler.post(new Runnable() { | |
@Override | |
public void run() { | |
// Do your stuff here related to UI, e.g. show toast |
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
`pip install pycrypto` | |
from Crypto.Cipher import DES3 | |
from Crypto import Random | |
key = 'Sixteen byte key' | |
iv = Random.new().read(DES3.block_size) #DES3.block_size==8 | |
cipher_encrypt = DES3.new(key, DES3.MODE_OFB, iv) | |
plaintext = 'sona si latine loqueri ' #padded with spaces so than len(plaintext) is multiple of 8 | |
encrypted_text = cipher_encrypt.encrypt(plaintext) |