Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vschmidt94
vschmidt94 / retro_gruvbox_linux_wallpaper.svg
Last active July 27, 2023 20:19
A retro / vintage Linux wallpaper with dark gruvbox colors
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
### Keybase proof
I hereby claim:
* I am vschmidt94 on github.
* I am vschmidt (https://keybase.io/vschmidt) on keybase.
* I have a public key ASA_7cyG3Wlsn4a9jvBJcoHVX7qjVTQbAMhjsNM3seZV8wo
To claim this, I am signing this object:
@vschmidt94
vschmidt94 / gist:d2366881a9c06dbce379
Created May 24, 2015 16:00
Android get and parse nested JSON
package org.corvallisrecycles.recycleapp;
import android.app.ProgressDialog;
import android.content.ContentValues;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.AsyncTask;
import android.os.Bundle;
@vschmidt94
vschmidt94 / gist:4568dd65735b419c4fec
Created May 24, 2015 14:43
Android get and parse nested JSON
package org.corvallisrecycles.recycleapp;
import android.app.ProgressDialog;
import android.content.ContentValues;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.AsyncTask;
import android.os.Bundle;
{
"Database": {
"Companies": [
{
"cmp_id": "1",
"cmp_name": "Albany-Corvallis ReUseIt",
"cmp_address1": "online-only",
"cmp_address2": "",
"cmp_city": "Albany-Corvallis",
"cmp_state": "OR",
@vschmidt94
vschmidt94 / gist:eb8a52b72d4f72240c43
Created May 24, 2015 14:14
Using Google Doc Viewer to Open a PDF
public void goToRepublicRecyle(View view) {
showPDF("https://docs.google.com/viewer?url=http://site.republicservices.com/site/corvallis-or/en/documents/corvallisrecycledepot.pdf");
}
public void goToRepublicCurbside(View view) {
showPDF("https://docs.google.com/viewer?url=http://site.republicservices.com/site/corvallis-or/en/documents/detailedrecyclingguide.pdf");
}
private void showPDF(String url) {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.1.1'
compile files('libs/android-async-http-1.4.7.jar')
}
@vschmidt94
vschmidt94 / build.gradle
Created May 17, 2015 17:50
Dependencies section for HowTo
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.1.1'
compile files('libs/android-async-http-1.4.7.jar')
compile files('libs/gson-2.3.1.jar')
}
@vschmidt94
vschmidt94 / api.php
Created May 17, 2015 16:58
Publish MySQL table(s) as JSON using PHP webservice
<?php
# Exposes public API to retrieve select data from the Corvallis
# Recycles database.
#
# useage: HTTP GET call to <yoururl>?cmp=1&cat=1&itm=1
#
# note 1: You can request only specific tables if you desire,
# simply set the table flag to 0 if not desired.
#