Skip to content

Instantly share code, notes, and snippets.

View tonussi's full-sized avatar

Lucas Tonussi tonussi

View GitHub Profile
@tonussi
tonussi / localization.dart
Created December 11, 2023 18:33 — forked from valterh4ck3r/localization.dart
Portuguese BR Localization Flutter
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:intl/date_symbol_data_local.dart' as intl;
import 'package:intl/intl.dart' as intl;
class _PTBRMaterialLocalizationsDelegate
extends LocalizationsDelegate<MaterialLocalizations> {
@tonussi
tonussi / k3d-install-dashboard.md
Created June 5, 2022 16:52 — forked from smijar/k3d-install-dashboard.md
k3d-install-dashboard

ref

https://rancher.com/docs/k3s/latest/en/installation/kube-dashboard/

install

Deploying the Kubernetes Dashboard

GITHUB_URL=https://github.com/kubernetes/dashboard/releases
VERSION_KUBE_DASHBOARD=$(curl -w '%{url_effective}' -I -L -s -S ${GITHUB_URL}/latest -o /dev/null | sed -e 's|.*/||')
kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/${VERSION_KUBE_DASHBOARD}/aio/deploy/recommended.yaml
@tonussi
tonussi / setup-kubernetes-ubuntu-16.md
Created May 13, 2022 16:33 — forked from martin-magakian/setup-kubernetes-ubuntu-16.md
Install a 3 Node Kubernetes Cluster on Ubuntu 18

Master: Dependencies

apt update && apt upgrade -y
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -

cat <<EOF > /etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial main
EOF
@tonussi
tonussi / transparent_window.py
Created March 24, 2020 12:59 — forked from KurtJacobson/transparent_window.py
Transparent Window in Gtk+ 3, python
#!/usr/bin/env python
# Copyright (c) 2017 Kurt Jacobson
# License: https://kcj.mit-license.org/@2017
import cairo
import gi
gi.require_version('Gtk', '3.0')
gi.require_version('Gdk', '3.0')
@tonussi
tonussi / dremio-ubuntu
Last active January 6, 2020 18:55 — forked from evan-burke/dremio-ubuntu
[DREMIO: Install dremio on Ubuntu] #dremio
Installing Dremio on Ubuntu
### NOTE: this is significantly out of date since I last edited it in Jan 2018.
# See the comments on the gist for suggested changes for more recent versions.
##Install links / references
https://www.dremio.com/tutorials/recommender-scikit-learn-dremio-postgres-mongodb/
https://www.dremio.com/tutorials/dremio-oracle-aws/
https://docs.dremio.com/deployment/standalone-tarball.html
#! /usr/bin/python
import dota2api
from dota2api.src.exceptions import APIError, APITimeoutError
import csv
from multiprocessing import Pool
import time
import sys
def getMatchInfo( api, matchId ):
@tonussi
tonussi / Bad words
Created April 16, 2019 16:02 — forked from aldeka/Bad words
A comma-delimited list of bad words.
4r5e, 5h1t, 5hit, a55, anal, anus, ar5e, arrse, arse, ass, ass-fucker, asses, assfucker, assfukka, asshole, assholes, asswhole, a_s_s, b!tch, b00bs, b17ch, b1tch, ballbag, balls, ballsack, bastard, beastial, beastiality, bellend, bestial, bestiality, bi+ch, biatch, bitch, bitcher, bitchers, bitches, bitchin, bitching, bloody, blow job, blowjob, blowjobs, boiolas, bollock, bollok, boner, boob, boobs, booobs, boooobs, booooobs, booooooobs, breasts, buceta, bugger, bum, bunny fucker, butt, butthole, buttmuch, buttplug, c0ck, c0cksucker, carpet muncher, cawk, chink, cipa, cl1t, clit, clitoris, clits, cnut, cock, cock-sucker, cockface, cockhead, cockmunch, cockmuncher, cocks, cocksuck , cocksucked , cocksucker, cocksucking, cocksucks , cocksuka, cocksukka, cok, cokmuncher, coksucka, coon, cox, crap, cum, cummer, cumming, cums, cumshot, cunilingus, cunillingus, cunnilingus, cunt, cuntlick , cuntlicker , cuntlicking , cunts, cyalis, cyberfuc, cyberfuck , cyberfucked , cyberfucker, cyberfuckers, cyberfucking , d1ck,
@tonussi
tonussi / WebhookTutorial.md
Created February 28, 2019 20:45 — forked from jagrosh/WebhookTutorial.md
Simple Webhook Tutorial (Twitter -> Discord)

Simple Webhook Tutorial

In this tutorial, I will be explaining how to set up a simple webhook to relay your tweets to a Discord channel

Step 1 - Register on Zapier

  1. Go to https://zapier.com/ and create an account (if you don't already have one).

Step 2 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send Tweets
@tonussi
tonussi / gist:4ff4d263a164c62fc3fbd557f4d6060b
Created January 26, 2018 20:08 — forked from Sleepingwell/gist:7445312
Example of using geoalchemy.
# A simple script to load data from a shapefile into a spatialite db.
# Transfering the geometries is slow. It would probably be much faster to
# use WKB directly for the load, but I cannot get this to work.
# This is largely copied from
# https://github.com/geoalchemy/geoalchemy/blob/master/examples/spatialite.py
import os, osgeo.ogr
from sqlite3 import dbapi2 as sqlite
from sqlalchemy.orm import sessionmaker
from sqlalchemy import event, create_engine, MetaData
@tonussi
tonussi / load_hdf.py
Created December 17, 2016 19:16 — forked from robinkraft/load_hdf.py
Load hdf file with GDAL and Python, get NDVI
from osgeo import gdal
import os
layer_dict = {"reli":"reliability", "qual":"Quality", "ndvi":"NDVI", "evi":"EVI"}
def print_data(layer, data):
print data
print "data:", layer
print "type:", data.dtype
print "mean:", data.mean()