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 requests.api import request | |
from Crypto.Cipher import PKCS1_OAEP, PKCS1_v1_5 | |
from Crypto.Cipher import AES | |
from Crypto.PublicKey import RSA | |
from Crypto.Util.Padding import pad | |
from Crypto.Util.number import bytes_to_long | |
import base64 | |
import requests | |
import string | |
import random |
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
#!/bin/bash | |
USAGE="Usage is: ./svg-to-android.sh <svg_file> <exported_png_name> <width_dp> <height_dp> [resources_dir] \n \ | |
If 'resources_dir' is ommited, a new folder is created in the current directory, named after the svg name.\n \ | |
Param 'exported_png_name' does not need extension.\n \ | |
On Mac OS specify full path for svg file and resources directory.\n \ | |
Exiting." | |
if [[ -z "$1" ]]; | |
then |
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
#!/bin/bash | |
if [[ -z "$1" ]]; | |
then | |
echo "No SVG file specified. Exiting." | |
exit -1 | |
fi | |
ispng=$(file $1) | |
echo $ispng | grep -q SVG |
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
package demo.twitter4j; | |
import twitter4j.Twitter; | |
import twitter4j.TwitterException; | |
import twitter4j.TwitterFactory; | |
import twitter4j.auth.Authorization; | |
import twitter4j.conf.ConfigurationBuilder; | |
import twitter4j.internal.http.HttpRequest; | |
/** |
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
// Copyright 2012 Square, Inc. | |
package com.squareup.widgets; | |
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.util.AttributeSet; | |
import android.widget.ImageView; | |
/** Maintains an aspect ratio based on either width or height. Disabled by default. */ | |
public class AspectRatioImageView extends ImageView { |