Skip to content

Instantly share code, notes, and snippets.

View paolorotolo's full-sized avatar
🖖

Paolo Rotolo paolorotolo

🖖
View GitHub Profile
@Krosxx
Krosxx / flutter_aar_upload.gradle
Created March 11, 2021 10:55
Flutter module upload aar to maven
// This script is used to initialize the build in a module or plugin project.
// During this phase, the script applies the Maven plugin and configures the
// destination of the local repository.
// The local repository will contain the AAR and POM files.
void configureProject(Project project, String mavenUrl, String mavenUser, String mavenPwd, String version) {
if (!project.hasProperty("android")) {
throw new GradleException("Android property not found.")
}
if (!project.android.hasProperty("libraryVariants")) {
@GiovanniGrieco
GiovanniGrieco / circumvent-gnome-memhog.sh
Last active April 28, 2018 20:17
Circumvent GNOME 3 Memory Leak
#!/usr/bin/bash
# Copyright 2018 Giovanni Grieco <[email protected]>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
@rjleaf
rjleaf / tensorflow_fedora.md
Last active August 19, 2021 08:04
Tensorflow on Fedora

Note: Adapted from official Ubuntu instructions for Tensorflow using virtualenv.

This gist is currently a "Work in Progress". It works, but requires superuser privileges. I have not tested it with GPU support.

  1. Install pip and Virtualenv by issuing one of the following commands:
sudo dnf install python-pip python-devel python-virtualenv  # for Python 2.7
sudo dnf install python3-pip python3-devel python3-virtualenv # for Python 3.x
@ryanml
ryanml / stranger-things.bas
Last active May 13, 2018 02:48
Bob's Password Brute-Forcer from Stranger Things Season 2
10 DIM FourDigitPassword INTEGER
20 FOR i = 0 TO 9
30 FOR j = 0 TO 9
40 FOR k = 0 TO 9
50 FOR l = 0 TO 9
60 FourDigitPassword = getFourDigits (i,j,k,l)
70 IF checkPasswordMatch(FourDigitPassword) = TRUE THEN
80 GOTO 140
90 END
100 NEXT l
@eguven
eguven / brew-list.sh
Last active November 16, 2024 19:55
List all packages installed using Homebrew and their sizes
# this original one uses values returned from 'brew info'
brew list --formula | xargs -n1 -P8 -I {} \
sh -c "brew info {} | egrep '[0-9]* files, ' | sed 's/^.*[0-9]* files, \(.*\)).*$/{} \1/'" | \
sort -h -r -k2 - | column -t
# faster alternative using 'du'
du -sch $(brew --cellar)/*/* | sed "s|$(brew --cellar)/\([^/]*\)/.*|\1|" | sort -k1h
@farbodsz
farbodsz / LabelledSpinner.md
Last active August 3, 2017 16:15
A Spinner component with a floating label for Android, similar to EditText components wrapped in a TextInputLayout.

Moved to an Android library...

This Gist has been discontinued and will be updated on a GitHub project here. The files I have removed from this Gist can be found there. Please feel free to open issues, pull requests, etc, so that I can change and improve the library how you like.

If you are already using the Gist, delete the layout XML, values XML, and Java files (the ones I have removed from this Gist), and instead add the following in your app module's build.gradle dependencies:

compile 'com.satsuware.lib:usefulviews:+'

Make sure to change your imports as well in the files that you are using the LabelledSpinner component.