Put flip
somewhere in your $PATH
and chmod a+x
it.
Copy fuck
into ~/.bashrc
.
private void asyncTaskWithInlineCallback() { | |
// display UI progress indicator | |
// ... | |
new MyAsyncTask() { | |
protected void onPostExecute(Boolean result) { | |
// dismiss UI progress indicator | |
// process the result | |
// ... | |
} |
@charset "UTF-8"; | |
@mixin grab-cursor { | |
// http://www.google.com/intl/en_ALL/mapfiles/openhand.cur | |
cursor: url('data:image/vnd.microsoft.icon;base64,AAACAAEAICACAAcABQAwAQAAFgAAACgAAAAgAAAAQAAAAAEAAQAAAAAAAAEAAAAAAAAAAAAAAgAAAAAAAAAAAAAA////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD8AAAA/AAAAfwAAAP+AAAH/gAAB/8AAA//AAAd/wAAGf+AAAH9gAADbYAAA2yAAAZsAAAGbAAAAGAAAAAAAAA//////////////////////////////////////////////////////////////////////////////////////gH///4B///8Af//+AD///AA///wAH//4AB//8AAf//AAD//5AA///gAP//4AD//8AF///AB///5A////5///8='), all-scroll; | |
// cursor: -webkit-grab; | |
cursor: -moz-grab; | |
cursor: -o-grab; | |
cursor: -ms-grab; | |
cursor: grab; |
<?php | |
// get next and prev products | |
// Author: Georgy Bunin ([email protected]) | |
// forked from https://gist.github.com/2176823 | |
function ShowLinkToProduct($post_id, $categories_as_array, $label) { | |
// get post according post id | |
$query_args = array( 'post__in' => array($post_id), 'posts_per_page' => 1, 'post_status' => 'publish', 'post_type' => 'product', 'tax_query' => array( | |
array( | |
'taxonomy' => 'product_cat', |
package com.readystatesoftware.views; | |
import android.content.Context; | |
import android.graphics.Rect; | |
import android.util.AttributeSet; | |
import android.widget.LinearLayout; | |
public class FittingLinearLayout extends LinearLayout { | |
public FittingLinearLayout(Context context, AttributeSet attrs, int defStyle) { |
// Apache 2.0 licensed. | |
import android.content.Context; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.BaseAdapter; | |
/** An implementation of {@link BaseAdapter} which uses the new/bind pattern for its views. */ | |
public abstract class BindableAdapter<T> extends BaseAdapter { |
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<!-- google's material design colours from | |
http://www.google.com/design/spec/style/color.html#color-ui-color-palette --> | |
<!--reds--> | |
<color name="md_red_50">#FFEBEE</color> | |
<color name="md_red_100">#FFCDD2</color> | |
<color name="md_red_200">#EF9A9A</color> |
/* | |
* Copyright (C) 2014 The Android Open Source Project | |
* | |
* 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 |
/** | |
* Show the activity over the lockscreen and wake up the device. If you launched the app manually | |
* both of these conditions are already true. If you deployed from the IDE, however, this will | |
* save you from hundreds of power button presses and pattern swiping per day! | |
*/ | |
public static void riseAndShine(Activity activity) { | |
activity.getWindow().addFlags(FLAG_SHOW_WHEN_LOCKED); | |
PowerManager power = (PowerManager) activity.getSystemService(POWER_SERVICE); | |
PowerManager.WakeLock lock = |
/* | |
* Copyright (C) 2016 Jesse Wilson | |
* | |
* 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 |