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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
from __future__ import print_function | |
import sys | |
import os | |
import os.path | |
import shutil | |
import subprocess | |
import glob |
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 org.junit.Test; | |
import java.text.DateFormat; | |
import java.util.Calendar; | |
import java.util.Date; | |
import java.util.Locale; | |
import java.util.TimeZone; | |
import static org.junit.Assert.assertEquals; |
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 ru.gelin.kotlin.util.hex | |
import java.security.MessageDigest | |
import kotlin.test.assertEquals | |
/** | |
* Extension functions to format bytes as Hex values. | |
*/ | |
/** |
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
//Java | |
newIntent.setData(intent.getParcelableExtra(Intent.EXTRA_STREAM)); //compilation error | |
newIntent.setData(intent.<Uri>getParcelableExtra(Intent.EXTRA_STREAM)); //explicit type declaration | |
newIntent.setData((Uri) intent.getParcelableExtra(Intent.EXTRA_STREAM)); //explicit type cast | |
//Kotlin | |
newIntent.setData(intent.getParcelableExtra(Intent.EXTRA_STREAM)) //implicit type inference! | |
val stream = intent.getParcelableExtra(Intent.EXTRA_STREAM) //compilation error | |
val stream : Uri = intent.getParcelableExtra(Intent.EXTRA_STREAM) //explicit type inference | |
newIntent.setData(stream) |
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
#!/usr/bin/python3 | |
import sys | |
import codecs | |
import hoep | |
from pygments import highlight | |
from pygments.lexers import get_lexer_by_name, guess_lexer | |
from pygments.formatters import HtmlFormatter | |
import pyperclip |
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
<html> | |
<head> | |
<title>Test charts</title> | |
<script src="http://code.jquery.com/jquery-2.1.4.min.js" type="text/javascript"></script> | |
<script src="http://d3js.org/d3.v3.min.js" type="text/javascript"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/rickshaw/1.5.1/rickshaw.min.js" type="text/javascript"></script> | |
<script src="index.js" type="text/javascript"></script> | |
<link href="https://cdnjs.cloudflare.com/ajax/libs/rickshaw/1.5.1/rickshaw.min.css" media="screen" rel="stylesheet" type="text/css"> | |
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css"> |
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
{ | |
"ansible_facts": { | |
"ansible_all_ipv4_addresses": [ | |
"172.17.42.1", | |
"10.0.2.15", | |
"10.40.20.2" | |
], | |
"ansible_all_ipv6_addresses": [ | |
"fe80::486d:2dff:fe59:74a2", | |
"fe80::5484:7aff:fefe:9799", |
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/sh | |
set -e | |
PRINTER="/dev/usb/lp0" # the printer device | |
FORCE=false | |
DIRECTION=1 # 1 - human-friendly, 0 - paper-friendly | |
DOTS_MM=8 # printer dots per mm, 8 == 203 dpi |
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
#!/usr/bin/env python3 | |
PRINTER = '/dev/usb/lp0' # the printer device | |
DOTS_MM = 8 # printer dots per mm, 8 == 203 dpi | |
WIDTH_MM = 100 # sticker width, mm | |
HEIGHT_MM = 35 # sticker height, mm | |
GAP_MM = 2 # sticker gap, mm | |
FONT = "0" # built-in vector font, scalable by X and Y |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder