Skip to content

Instantly share code, notes, and snippets.

https://en.wikipedia.org/wiki/JPEG_File_Interchange_Format
http://dev.exiv2.org/projects/exiv2/wiki/The_Metadata_in_JPEG_files
http://paulbourke.net/dataformats/bitmaps/
@borsch
borsch / must_know
Created September 29, 2016 15:04
things_developer_must_know
точно мережі
точно мені не вистачає адміністрування юнікс систем
дуже часто треба ПХП
лінійка JavaScript від сервера до клієнта
мені не вистачає реально Java EE
багатопоточність
робота з базами
XML + JSON
автоматичне і мануальне тестування
continuous integration
@borsch
borsch / load.java
Created September 16, 2016 07:04
down load file from url with java
String url = "http://my-site.com/text.txt";
String fileName = "/path/to/file/to/save/text.txt";
URL website = new URL(url);
ReadableByteChannel rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(fileName);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
@borsch
borsch / part_of_pom.xml
Last active September 16, 2016 07:05
create excutable jar with maven
<build>
<plugins>
<plugin>
<!-- Build an executable JAR -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<archive>
<manifest>
// script.js
(function(exports){
// public function
// can be accessed outside of this file
exports.publicFunction = function(param1, param2){
};
// private function
@borsch
borsch / gist:bf75d4f9d009d9c5f84c
Created August 21, 2015 13:48
facebook make post with js
<html>
<head>
<script src="https://connect.facebook.net/en_US/sdk.js"></script>
</head>
<body>
<script type="text/javascript">
var PAGE_ID = 'page_id';
var PAGE_ACCESS_TOKEN = 'access_tooken_to_page';
window.fbAsyncInit = function() {
FB.init({