This file contains hidden or 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
// Add your image in comments to get their downloadable link. |
This file contains hidden or 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
# Hôte virtuel par défaut | |
<VirtualHost *:80> | |
ServerAdmin [email protected] | |
ServerName monsite.local | |
DocumentRoot /var/www/html | |
ErrorLog /var/www/log/error.log | |
CustomLog /var/www/log/access.log combined | |
</VirtualHost> | |
<VirtualHost *:80> a2dissite default | |
ServerAdmin [email protected] |
This file contains hidden or 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
.addHeader("Authorization", "Bearer " + PrefUtils.getToken().orEmpty()) | |
//.addHeader("Accept-Language", PrefUtils.getLanguage()!!) | |
.addHeader("Device-OS", "android") | |
.addHeader("App-Source", "com.achabi.distributors") | |
.addHeader("Content-Type", "application/json") | |
.addHeader("Accept", "application/json") | |
.addHeader("X-Achabi-App", "Distributor") |
This file contains hidden or 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
/** | |
* * New version: 30/May/2017 | |
* * Made it more kotlin-like with same functionality ^^ | |
* | |
* based on: https://gist.github.com/RomansBermans/6f3836188427fbd3b1efcf7e6418f06d | |
* Fancy ID generator that creates 20-character string identifiers with the following properties: | |
* | |
* 1. They're based on timestamp so that they sort *after* any existing ids. | |
* 2. They contain 72-bits of random data after the timestamp so that IDs won't collide with other clients' IDs. | |
* 3. They sort *lexicographically* (so the timestamp is converted to characters that will sort properly). |
This file contains hidden or 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
/** | |
* Fancy ID generator that creates 20-character string identifiers with the following properties: | |
* | |
* 1. They're based on timestamp so that they sort *after* any existing ids. | |
* 2. They contain 72-bits of random data after the timestamp so that IDs won't collide with other clients' IDs. | |
* 3. They sort *lexicographically* (so the timestamp is converted to characters that will sort properly). | |
* 4. They're monotonically increasing. Even if you generate more than one in the same timestamp, the | |
* latter ones will sort after the former ones. We do this by using the previous random bits | |
* but "incrementing" them by 1 (only in the case of a timestamp collision). | |
*/ |
This file contains hidden or 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.ternaryop.phototumblrshare.widget; | |
import android.content.Context; | |
import android.util.AttributeSet; | |
import android.view.MotionEvent; | |
import android.view.View; | |
import android.view.View.OnTouchListener; | |
import android.widget.TextView; | |
public class ClickableTextView extends TextView implements OnTouchListener { |