Skip to content

Instantly share code, notes, and snippets.

View gionn's full-sized avatar
⚔️

Giovanni Toraldo gionn

⚔️
View GitHub Profile
@gionn
gionn / dynatrace-soft-restart.rb
Created April 10, 2020 08:53
Chef recipe to automatically restart docker containers or generic services affected by an update of dynatrace agent
ruby_block "check-restart-dynatrace" do
block do
headers = {:Authorization => "Api-Token #{provider['api_key']}"}
client = Chef::HTTP.new(provider['url'])
processes = JSON.parse(client.get('/processes?includeDetails=true', headers))
hosts = JSON.parse(client.get('/hosts?includeDetails=true', headers))
host_found = hosts.select { |host| host['discoveredName'] == node['hostname'] }.first
if host_found
host_id = host_found['entityId']
processes.select { |process| process['fromRelationships']['isProcessOf'].include?(host_id) }
Fonte: https://www.maccanismi.it/2012/08/21/elenco-url-streaming-radio-italiane-sul-web-rtl-rds-radio-kiss-kiss-r101-virgin-radio-e-moltre-altre/
Da usare per lettori come VLC e similari.
RTL:
http://shoutcast.rtl.it:3010/
RTL Best:
http://shoutcast.rtl.it:3020/
RTL ItalianStyle:
@gionn
gionn / wireless
Last active February 18, 2018 20:03
Increase wifi speed on Gargoyle router (TP-Link TL-WR1043N/ND v1)
root@router:~# cat /etc/config/wireless
config wifi-device 'radio0'
option type 'mac80211'
option hwmode '11g'
option path 'platform/qca955x_wmac'
option htmode 'HT40-'
option noscan '1'
option channel '7'
@gionn
gionn / EX6120-V1.0.0.16_1.0.11.zip
Last active February 12, 2018 23:14
Netgear EX6190 unstable - no internet connection
This file has been truncated, but you can view the full file.
@gionn
gionn / huwei-p8-lite-slow-wifi.md
Last active November 12, 2018 03:15
huawei p8 lite how to fix slow wifi issue

How to fix slow wifi issue on Huawei P8 Lite

I have a TP-Link TD-W8980 v1 router, two Huawei P8 Lite devices and another bunch of devices working pretty well.

I was testing on https://fast.com, both p8 remain like 10 seconds on the page with 0 Kbps speed, and then reach awful speed (below 1 MB).

Turning bluetooth off fixed the issue, but after renabling it is still working.

Keybase proof

I hereby claim:

  • I am gionn on github.
  • I am gionn (https://keybase.io/gionn) on keybase.
  • I have a public key ASAaZElPBowaCE-MT5ndIUaK3dOCK2kjL2UZdbY2oaSJ8go

To claim this, I am signing this object:

@gionn
gionn / build.sh
Created February 15, 2017 13:48
Script to request a circleci build via $GH_REPO and $CIRCLE_TOKEN environment variables
#!/bin/bash -e
curl \
--header "Content-Type: application/json" \
--request POST \
https://circleci.com/api/v1.1/project/github/$GH_REPO/tree/master?circle-token=$CIRCLE_TOKEN
package com.liberologico.cloudesire.cmw.test.unit;
import org.hibernate.cfg.AvailableSettings;
import org.hibernate.cfg.Configuration;
import org.hibernate.dialect.PostgreSQL9Dialect;
import org.hibernate.tool.hbm2ddl.SchemaUpdate;
import org.hibernate.tool.hbm2ddl.SchemaValidator;
import org.junit.Test;
import javax.persistence.Entity;
@gionn
gionn / Comments.java
Last active February 2, 2018 15:01
Nice java code comments
{} // this is intentionally left blank
// Coming soon : backup plan
// However this is not a definitive solution
// This is an atrocity
// Questions overflow! Die Gosling!
@gionn
gionn / docker.rb
Last active August 29, 2015 14:25 — forked from anonymous/docker.rb
Install aufs module on Ubuntu when needed via chef
#
# Recipe:: docker
#
aufs_exists = `lsmod | grep aufs | wc -l`.strip
if aufs_exists.to_i == 0
kernel_version = node["kernel"]["release"]
package "linux-image-extra-#{kernel_version}" do