Skip to content

Instantly share code, notes, and snippets.

View at8eqeq3's full-sized avatar
😷

Dmitry Grigoriev at8eqeq3

😷
View GitHub Profile
@at8eqeq3
at8eqeq3 / Dockerfile
Created October 8, 2020 18:53
Totum Docker
FROM php:7.3-apache
RUN apt-get update && apt-get install -y postgresql-client
ARG PHP_VER=7.3
ADD https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz /tmp/
RUN tar xvzfC /tmp/ioncube_loaders_lin_x86-64.tar.gz /tmp/ && \
php_ext_dir="$(php -i | grep extension_dir | head -n1 | awk '{print $3}')" && \
mv /tmp/ioncube/ioncube_loader_lin_${PHP_VER}.so "${php_ext_dir}/" && \
echo "zend_extension = $php_ext_dir/ioncube_loader_lin_${PHP_VER}.so" \
@at8eqeq3
at8eqeq3 / gist:54e8c28dbec224789466d26d7f676916
Last active October 2, 2019 06:43
ADS-B data to 3D visualization
# get your ADS-B receiver running and make it listen for SBS-3 connection.
# then do in shell:
nc <ip-address> <port> | grep --line-buffered MSG,3 | cut -d ',' -f 12,15,16 | tee -a points.txt
# the more it runs, the more data you get. Then in Python, do:
import numpy as np
import pandas as pd
import pptk
<script type="text/javascript">
window.onload = function(){
img = Math.ceil(Math.random()*4);
div = document.getElementById("rnd_image");
div.style.background = "white url(http://first-optical.ru/images/"+img+".jpg) no-repeat";
if(img == 4){
div.innerHTML = '<a id="link_1" href="http://first-optical.ru/#"></a><a id="link_2" href="http://first-optical.ru/#"></a>' + div.innerHTML;
}
}
</script>
@at8eqeq3
at8eqeq3 / Gemfile
Created December 25, 2011 16:24
oops!
source 'http://rubygems.org'
gem 'rails', '3.1.3'
gem 'json'
group :assets do
gem 'sass-rails', '~> 3.1.5'
gem 'coffee-rails', '~> 3.1.1'
gem 'uglifier', '>= 1.0.3'
@at8eqeq3
at8eqeq3 / gist:1303558
Created October 21, 2011 10:49
madness
<%
# provide a default array for collecting CSS for sections
css = []
# if 'sections' is passed in as a local_assigns, all of this is ignored.
if local_assigns[:sections].blank?
# always have a title
sections = [{:yield => :body_content_title, :fallback => page_title, :title => true}]
# append sections from this page.