Skip to content

Instantly share code, notes, and snippets.

Avatar
✈️
Stay safe!

Matthew Runo inktomi

✈️
Stay safe!
View GitHub Profile
View gist:8a8f760620966fc58043
mAppBarHeader.setExpanded(false, true);
Handler animatedDelay = new Handler(Looper.getMainLooper());
animatedDelay.postDelayed(new Runnable()
{
@Override
public void run()
{
AppBarLayout.LayoutParams layout = (AppBarLayout.LayoutParams) mAppBarChildContainer.getLayoutParams();
layout.setScrollFlags(0);
View gist:df576ac82ae8100829fb
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/seller_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
View gist:4111d570baeef267eb4d
private void setupSidePanel(Toolbar toolbar) {
// Ensure we'll be able to see the drawer toggle button.
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
Account account = mAuthManager.getSingleAccountForType(BuildConfig.ACCOUNT_TYPE);
IDrawerItem signOutItem = null;
if (null != account) {
signOutItem = new PrimaryDrawerItem()
.withName(R.string.side_panel_sign_out)
@inktomi
inktomi / Updating Cheetah
Created Mar 12, 2015
Updated gqrx homebrew
View Updating Cheetah
mattruno@Matthews-MacBook-Pro ~ $ sudo pip install --upgrade Cheetah
Requirement already up-to-date: Cheetah in /usr/local/lib/python2.7/site-packages
Downloading/unpacking Markdown>=2.0.1 from https://pypi.python.org/packages/source/M/Markdown/Markdown-2.6.1.tar.gz#md5=c084f9d2fd0a839639fd9aa8c442d5cd (from Cheetah)
Downloading Markdown-2.6.1.tar.gz (298kB): 298kB downloaded
Running setup.py (path:/private/tmp/pip_build_root/Markdown/setup.py) egg_info for package Markdown
Installing collected packages: Markdown
Found existing installation: Markdown 2.6
Uninstalling Markdown:
Successfully uninstalled Markdown
@inktomi
inktomi / gnuradio.txt
Created Feb 27, 2015
Homebrew 10.10 gnuradio install failure
View gnuradio.txt
Install XQuartz
brew install gnuradio
It fails, vebose output attached.
View gist:44a3e57aa2aff077cd04
Matthews-MacBook-Pro:~ mruno$ brew install -v gqrx
==> Installing gqrx from chleggett/homebrew-gqrx
==> Installing gqrx dependency: gr-osmosdr
==> Downloading http://cgit.osmocom.org/gr-osmosdr/snapshot/gr-osmosdr-0.1.4.tar.gz
Already downloaded: /Library/Caches/Homebrew/gr-osmosdr-0.1.4.tar.gz
==> Verifying gr-osmosdr-0.1.4.tar.gz checksum
tar xf /Library/Caches/Homebrew/gr-osmosdr-0.1.4.tar.gz
==> cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/gr-osmosdr/0.1.4 -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_VERBOSE_MAKEFILE=ON -Wno-dev
-- The CXX compiler identification is AppleClang 6.0.0.6000056
-- The C compiler identification is AppleClang 6.0.0.6000056
@inktomi
inktomi / Activity.java
Last active May 9, 2017
Multipart Upload
View Activity.java
// From Camera
Bitmap photo = (Bitmap) data.getExtras().get("data");
File imageFileFolder = new File(getCacheDir(),"Avatar");
if( !imageFileFolder.exists() ){
imageFileFolder.mkdir();
}
FileOutputStream out = null;
@inktomi
inktomi / app.js
Last active Dec 13, 2015
Sample code.
View app.js
/**
* Module dependencies.
*/
var express = require('express');
var user = require('./routes/user');
var media = require('./routes/media');
var app = express();
app.use(express.bodyParser());
You can’t perform that action at this time.