Skip to content

Instantly share code, notes, and snippets.

View devtronic's full-sized avatar
👨‍💻

Julian Finkler devtronic

👨‍💻
View GitHub Profile

Compile V8 10.1.124.12

# Install required dependencies
sudo apt-get install build-essential curl git python libglib2.0-dev

cd /tmp
#!/usr/bin/env bash
echo ">>> Setup logstash"
sudo apt install logstash
sudo systemctl enable logstash
sudo systemctl start logstash
cat <<EOF | sudo tee /etc/rsyslog.d/01-json-template.conf
template(name="json-template"
@devtronic
devtronic / kibana_7.9.0.sh
Last active April 1, 2021 15:01
Laravel Homestead Kibana 7.9.0
#!/usr/bin/env bash
echo ">>> Installing Kibana"
# Check https://www.elastic.co/downloads/kibana for latest version
KIBANA_VERSION=7.9.0
sudo mkdir -p /opt/kibana
sudo chmod -R 755 /opt/kibana
sudo chown -R vagrant:vagrant /opt/kibana
@devtronic
devtronic / index.html
Last active November 17, 2019 15:23
Simple Tic Tac Toe Game implemented in HTML + CSS + JS
<!DOCTYPE html>
<html>
<head>
<style>
.game {
background-color: #eee;
border-spacing: 0;
}
.game tr:nth-child(2) td {
border-top: 1px solid #000;
@devtronic
devtronic / FlutterPlugin.kt
Created October 19, 2019 21:45
Implementing Flutter PlatformChannels methods the smart way
package my.flutter.plugin
import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.MethodChannel
import io.flutter.plugin.common.MethodChannel.MethodCallHandler
import io.flutter.plugin.common.MethodChannel.Result
import io.flutter.plugin.common.PluginRegistry.Registrar
import android.content.ContentValues.TAG
import android.util.Log
import java.lang.reflect.Method
@devtronic
devtronic / create-iso.sh
Created December 24, 2018 18:44 — forked from julianxhokaxhiu/create-iso.sh
Simple bash script to create a Bootable ISO from macOS Sierra Install Image from Mac App Store
#!/bin/bash
#
# Credits to fuckbecauseican5 from https://www.reddit.com/r/hackintosh/comments/4s561a/macos_Yosemite_16a238m_install_success_and_guide/
# Adapted to work with the official image available into Mac App Store
#
# Enjoy!
hdiutil attach /Applications/Install\ macOS\ Yosemite.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app
hdiutil create -o /tmp/Yosemite.cdr -size 7316m -layout SPUD -fs HFS+J
hdiutil attach /tmp/Yosemite.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/install_build
@devtronic
devtronic / check-updates.sh
Created November 25, 2018 10:46
Automatic update check for ubuntu server with mail notification
#!/bin/bash
apt update
upgradeable_count=$(($( apt list --upgradeable | wc -l) - 1))
if [ $upgradeable_count -gt 0 ]; then
apt list --upgradeable | mailx -s "$upgradeable_count Updates available at $(hostname)" someone@domain.tld
fi;
@devtronic
devtronic / Utf8Helper.php
Created November 25, 2017 05:58
This functions check before encoding / decoding if the string is already encoded / decoded.
<?php
/**
* utf8_encode only once
*
* @param string $data The data
* @return string The converted string
*/
function doUtf8($data)
{