- Configure shutter to save your screenshot directly intoyour dropbox public folder.
- Place
dropbox-puburl.sh
in the location of your choice (here~/tools/bin/dropbox-puburl.sh
) - Place
dropbox-screenshot-puburl.desktop
into/usr/share/applications
(you need to be root) - Eventually update the path to your Bash script
- exec
sudo update-desktop-database
- Quit and restart shutter. Go into
Preferences > Actions > Open With
and select Dropbox copy public file URL to clipboard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import gtk | |
import simplejson | |
import urllib2 | |
import subprocess | |
import datetime | |
import string | |
import random | |
import time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public EdgeEffect(Context context) { | |
final Resources res = context.getResources(); | |
mEdge = res.getDrawable(R.drawable.overscroll_edge); | |
mGlow = res.getDrawable(R.drawable.overscroll_glow); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#---- Generated by tint2conf 9757 ---- | |
# See https://gitlab.com/o9000/tint2/wikis/Configure for | |
# full documentation of the configuration options. | |
#------------------------------------- | |
# Backgrounds | |
# Background 1: Panel, Tooltip | |
rounded = 0 | |
border_width = 0 | |
border_sides = TBLR | |
background_color = #16161d 63 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ------------ Helper extension functions: | |
// Inline function to create Parcel Creator | |
inline fun <reified T : Parcelable> createParcel(crossinline createFromParcel: (Parcel) -> T?): Parcelable.Creator<T> = | |
object : Parcelable.Creator<T> { | |
override fun createFromParcel(source: Parcel): T? = createFromParcel(source) | |
override fun newArray(size: Int): Array<out T?> = arrayOfNulls(size) | |
} | |
// custom readParcelable to avoid reflection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Extend a winston by making it expand errors when passed in as the | |
// second argument (the first argument is the log level). | |
function expandErrors(logger) { | |
var oldLogFunc = logger.log; | |
logger.log = function() { | |
var args = Array.prototype.slice.call(arguments, 0); | |
if (args.length >= 2 && args[1] instanceof Error) { | |
args[1] = args[1].stack; | |
} | |
return oldLogFunc.apply(this, args); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var download = require('./lib/download'); | |
download('http://meuarquivolocodedoido.com.br/arquivo.txt', './downloads') | |
.then(function(id){ | |
console.log('Arquivo gravado com id %s', id); | |
}) | |
.catch(function(err){ | |
console.log('Deu pau..'); | |
console.log(err.stack); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.tinmegali.daggerwithkotlin.room | |
import android.arch.lifecycle.LiveData | |
import android.arch.lifecycle.Observer | |
import java.util.concurrent.CountDownLatch | |
import java.util.concurrent.TimeUnit | |
// Extension to allow unit tests on LiveData | |
// discussion on: https://stackoverflow.com/questions/44270688/unit-testing-room-and-livedata |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you want, I can try and help with pointers as to how to improve the indexing speed you get. Its quite easy to really increase it by using some simple guidelines, for example: | |
- Use create in the index API (assuming you can). | |
- Relax the real time aspect from 1 second to something a bit higher (index.engine.robin.refresh_interval). | |
- Increase the indexing buffer size (indices.memory.index_buffer_size), it defaults to the value 10% which is 10% of the heap. | |
- Increase the number of dirty operations that trigger automatic flush (so the translog won't get really big, even though its FS based) by setting index.translog.flush_threshold (defaults to 5000). | |
- Increase the memory allocated to elasticsearch node. By default its 1g. | |
- Start with a lower replica count (even 0), and then once the bulk loading is done, increate it to the value you want it to be using the update_settings API. This will improve things as possibly less shards will be allocated to each machine. | |
- Increase the number of machines you have so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.google.gson.JsonElement; | |
import com.google.gson.JsonObject; | |
import com.google.gson.JsonSerializationContext; | |
import com.google.gson.JsonSerializer; | |
import com.squareup.javapoet.*; | |
import javax.lang.model.element.Modifier; | |
import java.io.File; | |
import java.io.IOException; | |
import java.lang.reflect.Field; |
OlderNewer