Skip to content

Instantly share code, notes, and snippets.

View henriquedesousa's full-sized avatar

Henrique de Sousa henriquedesousa

  • GLS IT Services
  • Lisboa, Portugal
View GitHub Profile
@santisbon
santisbon / Search my gists.md
Last active November 1, 2024 16:22
How to search gists.

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files.
language:html

@cusspvz
cusspvz / 99-login-fon
Last active September 11, 2021 00:58
FON ZON / NOS auto-login bash script wget portugal non-wispr client openwrt
#!/bin/sh
# place this file at: /etc/hotplug.d/iface/99-login-fon
# Configurations
FON_USERNAME=email%40domain.com
FON_PASSWORD=123456
FON_DELAY_UP=3
COOKIE_JAR_PATH=/tmp/nos-fon-cookie-jar.$INTERFACE
. /lib/functions.sh
@ndorigatti
ndorigatti / giffify.bat
Last active August 29, 2015 14:27
Giffify - easily create optimised GIFs from a video (On Windows). This assumes you have ffmpeg.exe in the same folder or in the System PATH.
@echo off
REM !/bin/sh
REM License for any modification to the original (linked below):
REM ----------------------------------------------------------------------------
REM "THE BEER-WARE LICENSE" (Revision 42):
REM Sebastiano Poggi wrote this file. As long as you retain this notice you
REM can do whatever you want with this stuff. If we meet some day, and you think
REM this stuff is worth it, you can buy me a beer in return.
REM ----------------------------------------------------------------------------
REM
@lolzballs
lolzballs / HelloWorld.java
Created March 22, 2015 00:21
Hello World Enterprise Edition
import java.io.FileDescriptor;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
public class HelloWorld{
private static HelloWorld instance;
public static void main(String[] args){
instantiateHelloWorldMainClassAndRun();
@nicolasembleton
nicolasembleton / restart_bluetooth.sh
Last active May 11, 2024 17:43
Restart Bluetooth Daemon on Mac OS X without restarting
#!/bin/bash
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
@staltz
staltz / introrx.md
Last active November 14, 2024 11:27
The introduction to Reactive Programming you've been missing
@corsair992
corsair992 / MapViewWrapper.java
Last active April 11, 2016 09:44
This is a wrapper for MapView that can enable live custom info windows in the Android Google Maps API v2. It accomplishes this by wrapping both the MapView and info window View. The MapView wrapper passes on touch events to the info window if one is active, while the info window wrapper refreshes the info window by calling showInfoWindow() on th…
package com.example.liveinfowindow;
import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
import java.util.HashMap;
import java.util.Map;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Matrix;