Skip to content

Instantly share code, notes, and snippets.

@ulyanovn
ulyanovn / Transactions.dart
Last active December 6, 2018 08:41
Flutter Finance Workshop
import 'package:meta/meta.dart';
class Transactions {
final String comment;
final int type;
final double sum;
final int time;
Transactions({
@irazasyed
irazasyed / get-img-raw-data.php
Created April 14, 2013 13:05
PHP: Get image raw data (cURL & file_get_contents support)
/*-------------------------------------------------+
| Gets Image Raw Data,
| Used with GD Lib (imagecreatefromstring)
+-------------------------------------------------*/
function getImageRawData($image_url) {
if (function_exists('curl_init')) {
$opts = array();
$http_headers = array();
$http_headers[] = 'Expect:';
@MicahElliott
MicahElliott / colortrans.py
Created November 29, 2010 07:57
Convert values between RGB hex codes and xterm-256 color codes.
#! /usr/bin/env python
""" Convert values between RGB hex codes and xterm-256 color codes.
Nice long listing of all 256 colors and their codes. Useful for
developing console color themes, or even script output schemes.
Resources:
* http://en.wikipedia.org/wiki/8-bit_color
* http://en.wikipedia.org/wiki/ANSI_escape_code