Skip to content

Instantly share code, notes, and snippets.

View ivanionut's full-sized avatar
🎯
Focusing

Ivan Ionut ivanionut

🎯
Focusing
View GitHub Profile
@phillipsj
phillipsj / install-openjdk-8.sh
Created June 21, 2018 17:03
Quick little installation script for installing AdoptOpenJDK on Ubuntu 16.04.
wget -q https://github.com/AdoptOpenJDK/openjdk8-releases/releases/download/jdk8u172-b11/OpenJDK8_x64_Linux_jdk8u172-b11.tar.gz
tar -xf OpenJDK8_x64_Linux_jdk8u172-b11.tar.gz
sudo mkdir /usr/lib/jvm && sudo mv jdk8u172-b11 /usr/lib/jvm/jdk8u172-b11
export JAVA_HOME=/usr/lib/jvm/jdk8u172-b11
export PATH=/usr/lib/jvm/jdk8u172-b11/bin
java -version
@proffalken
proffalken / README.md
Last active March 5, 2025 05:40
Mautic Nginx Configuration

Mautic Nginx Configuration

These files allow you to configure Mautic using Nginx.

@hkamran80
hkamran80 / SmartTV2.txt
Last active April 19, 2025 21:53
Pi-hole Blocklist for Smart TVs
# THIS FILE IS NO LONGER BEING MAINTAINED. FOR A MAINTAINED VERSION, PLEASE USE THE VERSION IN THE NEW REPOSITORY.
# Repository: https://github.com/hkamran80/blocklists
# New link for this file: https://raw.githubusercontent.com/hkamran80/blocklists/main/smart-tv
# ------
# This is a blocklist to block Smart TVs sending data home.
# Please help to collect domains!
# It could be that the TV does not receive any more updates or other services no longer work. Please report such an incident.
<cfscript>
/*
this is what im actually working on, but isnt really the point of this discussion,
but for clarity, I have a process where I am needing to (conditionally) map
from one uuid to another, so I am making a litle closure to keep track. If
I ask for an ID that hasnt been seen yet then it just creates a new uuid for me and
then keeps track of it going forward.
*/
function makeIdMapper () {
@vovafeldman
vovafeldman / freemius-checkout-ga-fb-tracking.js
Last active October 2, 2024 01:00
Tracking purchases with Google Analytics and Facebook for Freemius Checkout
//
// Gist was kindly contributed by @jamesckemp from @iconicwp. Thanks!
//
handler.open({
...
purchaseCompleted: function( response ) {
var trial = response.purchase.trial_ends !== null,
total = trial ? 0 : response.purchase.initial_amount.toString(),
productName = 'Product Name',

How to install php7.2-fpm with EasyEngine (Ubuntu)


Add php7.2 repository

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update

Install php7.2-fpm

@kitwalker12
kitwalker12 / images.xml
Last active June 11, 2024 16:37
Amazon MWS Beauty Product Feed XML Sample
<?xml version="1.0" encoding="utf-8"?>
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
<Header>
<DocumentVersion>1.01</DocumentVersion>
<MerchantIdentifier>AXXXXXXXXXX</MerchantIdentifier>
</Header>
<MessageType>ProductImage</MessageType>
<Message>
<MessageID>1</MessageID>
<OperationType>Update</OperationType>
@marw
marw / nova_sds011.py
Created June 1, 2017 21:14
Get reading from Nova PM Sensor SDS011 (dust sensor, air quality sensor, PM10, PM2,5) with sleep option
import time
import logging
try:
import serial
except ImportError:
print('Python serial library required, on Ubuntu/Debian: ' +
'apt-get install python-serial python3-serial')
raise
@xaratustrah
xaratustrah / flask_nginx_gunicorn.md
Last active February 24, 2023 15:39
flask_nginx_gunicorn.md

Python Flask + nginx + gunicorn

Setting up a python flask web application using nginx, gunicorn and systemd on a Rasperry Pi

In the following, we assume a working Flask application with the name of SCRIPT_NAME. First we need to install a couple of things:

sudo apt-get update && sudo apt-get upgrade

Installing nginx will fail if apache is running. If your installation breaks half ways, then remove the fragments, stop apache (and I actually suggest removing it in case not needed) and then install nginx again:

sudo apt-get remove nginx* --purge

sudo /etc/init.d/apache2 stop

@stephenhouser
stephenhouser / Bing-Image-Scraper
Last active January 21, 2025 01:42
Bing-Image-Scraper
Bing image scraper example using Python to query and scrape Microsoft Bing image search.