Skip to content

Instantly share code, notes, and snippets.

View gusthavosouza's full-sized avatar
🇮🇸
Working from 🇮🇸

Gustavo De Souza gusthavosouza

🇮🇸
Working from 🇮🇸
View GitHub Profile
@gusthavosouza
gusthavosouza / git-tag-delete-local-and-remote.sh
Created April 1, 2020 21:40 — forked from mobilemind/git-tag-delete-local-and-remote.sh
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
struct Person {
var about: String
var firstName: String
var lastName: String
var job: String
func printPerson() {
print("About \(firstName) \(lastName)")
print("\(about)")
print("May be working as \(job)")
FOR /L %%A IN (1,1,1000) DO (
shutdown /r /m \\MICRO-%%A
ECHO shutdown /r /m \\MICRO-%%A
)
public class StairCase {
public static void main(String[] args) {
stairCase(10);
// output
// #
// ##
// ###
// ####
// #####
<(?:h:outputLabel)(?:\s+(?!for\b)[\w\-.:]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[\w\-.:]+))?)*\s*/?>
<rich:tab header="Escolher Metricas" id="tabMetrica"
rendered="#{SistemaController.passo eq 2}">
<rich:dragIndicator id="ind2" acceptClass="accept"
rejectClass="reject" draggingClass="default">
Arraste o item para a area disponivel
</rich:dragIndicator>
<h:form>
package uscs;
import java.io.*;
import java.net.*;
public class Atv02A {
@SuppressWarnings("deprecation")
public static void main(String args[]) {
String[] codigo = { "01", "02", "03", "04", "05", "06", "07", "08", "09", "10" };
String[] descr = { "Produto A", "Produto B", "Produto C", "Produto D", "Produto E", "Produto F", "Produto G",
package uscs;
import java.io.*;
import java.net.*;
public class Atv01 {
@SuppressWarnings("deprecation")
public static void main(String args[]) {
try {
@gusthavosouza
gusthavosouza / Connectivity.java
Created April 4, 2016 14:11 — forked from emil2k/Connectivity.java
Android utility class for checking device's network connectivity and speed.
package com.emil.android.util;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.telephony.TelephonyManager;
/**
* Check device's network connectivity and speed
* @author emil http://stackoverflow.com/users/220710/emil
** Ativa monitoramento remoto
** Testes utilizar sem autenticação
** Produção não utilizar sem autenticação
java -Xmx6m -Dcom.sun.management.jmxremote
-Dcom.sun.management.jm\parxremote.port=9000
-Dcom.sun.management.jmxremote.local.only=false
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false