Skip to content

Instantly share code, notes, and snippets.

View inktomi's full-sized avatar
✈️
Stay safe!

Matthew Runo inktomi

✈️
Stay safe!
View GitHub Profile
@inktomi
inktomi / app.js
Last active December 13, 2015 20:18
Sample code.
/**
* Module dependencies.
*/
var express = require('express');
var user = require('./routes/user');
var media = require('./routes/media');
var app = express();
app.use(express.bodyParser());
@inktomi
inktomi / Activity.java
Last active July 20, 2021 14:06
Multipart Upload
// 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 / gist:44a3e57aa2aff077cd04
Created February 14, 2015 22:21
qgrx brew failure
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 / gnuradio.txt
Created February 27, 2015 16:59
Homebrew 10.10 gnuradio install failure
Install XQuartz
brew install gnuradio
It fails, vebose output attached.
@inktomi
inktomi / Updating Cheetah
Created March 12, 2015 21:10
Updated gqrx homebrew
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 / gist:4111d570baeef267eb4d
Created March 16, 2015 16:09
Side Panel Setup
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)
<?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"
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);