Skip to content

Instantly share code, notes, and snippets.

@ElectrWeakHyprCharge
ElectrWeakHyprCharge / inumet.py
Last active August 19, 2024 23:23
Tiempo Actual de Inumet
import json
from urllib.request import urlopen
from collections import namedtuple
class Estación(namedtuple('Estación', 'nombre estación id')):
ARTIGAS = 16
RIVERA = 235
MELO = 160
SALTO = 239
YOUNG = 293
package com.example.sherryy.notificationsampleapp;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.NotificationCompat;
import android.support.v7.app.AppCompatActivity;
import android.text.format.DateUtils;
import android.view.View;
@money4honey
money4honey / LoadAd.java
Created August 23, 2015 00:02
This is singleton class for loading AdMob ads
package ru.moneyhoney.playground.util;
import com.google.android.gms.ads.AdListener;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.InterstitialAd;
import ru.moneyhoney.playground.R;
/* This is singleton class for loading AdMob ads
* Note: before call getAd() method call updateAd() */
@iamtekeste
iamtekeste / Download Google Drive files with WGET
Created July 8, 2015 11:00
Download Google Drive files with WGET
Download Google Drive files with WGET
Example Google Drive download link:
https://docs.google.com/open?id=[ID]
To download the file with WGET you need to use this link:
https://googledrive.com/host/[ID]
Example WGET command:
@djandyr
djandyr / gist:c04950a1375e96814316
Last active November 5, 2024 13:26
MacOS XAMPP PHP Installation

Change default Mac OS X PHP to XAMPP's PHP Installation and Install Composer


Find out what version of PHP is running

which php

This will output the path to the default PHP install which comes preinstalled by Mac OS X, by default

@mediavrog
mediavrog / gist:5625602
Last active March 20, 2024 16:59
Filter out Intents you don"t want to show from a IntentChooser dialog. For example your own app, competing apps or just apps you have a share integration by SDK already :) Based on http://stackoverflow.com/questions/5734678/custom-filtering-of-intent-chooser-based-on-installed-android-package-name/8550043#8550043
// Usage:
// blacklist
String[] blacklist = new String[]{"com.any.package", "net.other.package"};
// your share intent
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_TEXT, "some text");
intent.putExtra(android.content.Intent.EXTRA_SUBJECT, "a subject");
// ... anything else you want to add
// invoke custom chooser
@sa-tasche
sa-tasche / money_format
Last active February 1, 2022 01:40
money_format() by Rafael M. SalvioniSource: http://php.net/manual/en/function.money-format.php#89060
<?php
/**
* money_format() by Rafael M. Salvioni
* Source: http://php.net/manual/en/function.money-format.php#89060
*
*
* That it is an implementation of the function money_format for the
* platforms that do not it bear.
*
* The function accepts to same string of format accepts for the
@incredimike
incredimike / variousCountryListFormats.js
Last active October 3, 2025 10:21
List of Countries in various Javascript data structures: Alphabetical country lists & Country data objects.
// Lists of countries with ISO 3166 codes, presented in various formats.
// Last Updated: July 30, 2020
// If you're using PHP, I suggest checking out:
// https://github.com/thephpleague/iso3166
// or Laravel: https://github.com/squirephp/squire
//
// JS developers can check out:
// https://www.npmjs.com/package/iso3166-2-db
//