Skip to content

Instantly share code, notes, and snippets.

antoni

Block or report user

Report or block antoni

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tomwhipple
tomwhipple / dms2dec.py
Created Sep 2, 2012
convert DMS coordinates to decimal in Python
View dms2dec.py
#!/env/python
# coding=utf8
"""
Converting Degrees, Minutes, Seconds formatted coordinate strings to decimal.
Formula:
DEC = (DEG + (MIN * 1/60) + (SEC * 1/60 * 1/60))
Assumes S/W are negative.
@bcap
bcap / terminal-control.sh
Last active Nov 2, 2019
Useful terminal control characters
View terminal-control.sh
# Terminal output control (http://www.termsys.demon.co.uk/vtansi.htm)
TC='\e['
CLR_LINE_START="${TC}1K"
CLR_LINE_END="${TC}K"
CLR_LINE="${TC}2K"
# Hope no terminal is greater than 1k columns
RESET_LINE="${CLR_LINE}${TC}1000D"
@forairan
forairan / PhpJava.java
Last active Jan 27, 2020
This snippet of code is syntactically valid in both PHP and Java, and produces the same output in both.
View PhpJava.java
/*<?php
//*/public class PhpJava { public static void main(String[] args) { System.out.printf("/*%s",
//\u000A\u002F\u002A
class PhpJava {
static function main() {
echo(//\u000A\u002A\u002F
"Hello World!");
}}
//\u000A\u002F\u002A
PhpJava::main();
@pazdera
pazdera / builder.cpp
Created Aug 2, 2011
Example of `builder' design pattern in C++
View builder.cpp
/*
* Example of `builder' design pattern.
* Copyright (C) 2011 Radek Pazdera
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@Piasy
Piasy / install_ffmpeg.sh
Last active Jan 28, 2020
brew install ffmpeg with all options
View install_ffmpeg.sh
brew options ffmpeg
brew install ffmpeg \
--with-chromaprint \
--with-fdk-aac \
--with-fontconfig \
--with-freetype \
--with-frei0r \
--with-game-music-emu \
--with-libass \
You can’t perform that action at this time.