-
This is a numbered list.
-
I'm going to include a fenced code block as part of this bullet:
Code More Code
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 java.security.*; | |
public class Sha { | |
public static String hash256(String data) throws NoSuchAlgorithmException { | |
MessageDigest md = MessageDigest.getInstance("SHA-256"); | |
md.update(data.getBytes()); | |
return bytesToHex(md.digest()); | |
} | |
public static String bytesToHex(byte[] bytes) { | |
StringBuffer result = new StringBuffer(); | |
for (byte byt : bytes) result.append(Integer.toString((byt & 0xff) + 0x100, 16).substring(1)); |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
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
# $Id$ generated with make-mac-prefixes.pl | |
# Original data comes from http://standards.ieee.org/regauth/oui/oui.txt | |
# These values are known as Organizationally Unique Identifiers (OUIs) | |
# See http://standards.ieee.org/faqs/OUI.html | |
# We have added a few unregistered OUIs at the end. | |
000000 Xerox | |
000001 Xerox | |
000002 Xerox | |
000003 Xerox | |
000004 Xerox |
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
private String getFragmentTag(int pos){ | |
return "android:switcher:"+R.id.pager+":"+pos; | |
} |
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 de.slowpoke; | |
import android.app.Activity; | |
import android.app.ProgressDialog; | |
import android.content.Context; | |
import android.os.AsyncTask; | |
import android.os.Bundle; | |
import android.support.v4.app.FragmentActivity; | |
/** |
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
Reveal.initialize({ | |
// Display controls in the bottom right corner | |
controls: true, | |
// Display a presentation progress bar | |
progress: true, | |
// If true; each slide will be pushed to the browser history | |
history: true, | |
// Loops the presentation, defaults to false | |
loop: false, | |
// Flags if mouse wheel navigation should be enabled |
Sometimes you want to have a subdirectory on the master
branch be the root directory of a repository’s gh-pages
branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master
branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist
.
Remove the dist
directory from the project’s .gitignore
file (it’s ignored by default by Yeoman).
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
/* | |
* Copyright (c) 2017 Emil Davtyan | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining | |
* a copy of this software and associated documentation files (the | |
* "Software"), to deal in the Software without restriction, including | |
* without limitation the rights to use, copy, modify, merge, publish, | |
* distribute, sublicense, and/or sell copies of the Software, and to | |
* permit persons to whom the Software is furnished to do so, subject to | |
* the following conditions: |
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 android.support.v4.app.Fragment; | |
public class FragmentUtils { | |
/** | |
* @param fragment | |
* The Fragment whose parent is to be found | |
* @param parentClass | |
* The interface that the parent should implement | |
* @return The parent of fragment that implements parentClass, |
OlderNewer