Skip to content

Instantly share code, notes, and snippets.

View jaredrummler's full-sized avatar

Jared Rummler jaredrummler

View GitHub Profile
/*
* Copyright (C) 2014 Jared Rummler <jared@jrummyapps.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@jaredrummler
jaredrummler / MediaFireLoader.java
Last active August 29, 2015 14:05
Grab the direct link from mediafire on Android
/*
* Copyright (C) 2014 Jared Rummler <jared@jrummyapps.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@jaredrummler
jaredrummler / GoogleNowWalls.java
Last active August 29, 2015 14:05
Get a Google Now Wallpaper by the time of day (dawn, day, dusk, night)
/*
* Copyright (C) 2014 Jared Rummler <jared@jrummyapps.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@jaredrummler
jaredrummler / youtube-to-bootanimation.sh
Last active November 12, 2023 19:58
Create an Android bootanimation from a YouTube video
#!/bin/bash
#
# youtube-to-bootanimation.sh - Download & create Android boot animations from YouTube videos
#
# author: Jared Rummler <jared@jrummyapps.com>
#
# Replace URL with any YouTube link
url="https://www.youtube.com/watch?v=Ynm6Vgyzah4"
# Set the frames per second for the boot animation
@jaredrummler
jaredrummler / text.sh
Last active August 29, 2015 14:07
Use the terminal to enter text on Android devices.
#!/bin/sh
#############################################
#
# text.sh inputs text on Android devices
# using adb shell.
#
# author: Jared Rummler
# since: Oct 22, 2014
# version: 1.0
#
@jaredrummler
jaredrummler / SearchViewStyle.java
Last active May 22, 2020 22:48
Customize the SearchView in an ActionBar for Android
/*
* Copyright (C) 2015 Jared Rummler <jared.rummler@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@jaredrummler
jaredrummler / colors.xml
Last active July 23, 2021 16:52
Android colors.xml - Material, Holo, and other colors.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Social media and other company colors -->
<eat-comment />
<color name="facebook">#FF3B5998</color>
<color name="twitter">#FF00ACED</color>
<color name="google_plus">#FFDD4B39</color>
<color name="youtube">#FFBB0000</color>
@jaredrummler
jaredrummler / MenuTint.java
Last active April 13, 2022 03:58
Helper class to set the color and transparency for menu icons in an ActionBar or Toolbar.
/*
* Copyright (C) 2015. Jared Rummler <jared.rummler@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
<?php
$db_con = mysqli_connect("localhost", "username", "password", "database");
$result = $db_con->query('SELECT * FROM some_table');
if (!$result) die('Couldn\'t fetch records');
$num_fields = mysqli_num_fields($result);
$headers = array();
while ($fieldinfo = mysqli_fetch_field($result)) {
$headers[] = $fieldinfo->name;
}
$fp = fopen('php://output', 'w');
@jaredrummler
jaredrummler / EdgeTint.java
Last active January 19, 2016 11:03
Tint edges on pre-lollipop
/*
* Copyright (C) 2015 Jared Rummler <jared.rummler@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software