Skip to content

Instantly share code, notes, and snippets.

View m4ary's full-sized avatar
🎯
Focusing

Mshary m4ary

🎯
Focusing
View GitHub Profile

Telegram Bot for Udacity Mentor Dashboard

UdacityBotis a Telegram Bot for Control your Udacity Mentor Dashboard screenshot

✨ Features

  • Check if you have any projects wait for review
  • Get your total earning since specific month and year.
  • Exit from queue to review all your projects.
  • Join queue to review all your projects.
# Telegram Bot for Udacity Mentor Dashboard
`UdacityBot`is a Telegram Bot for Control your Udacity Mentor Dashboard
<img src="https://github.com/m4ary/UdaictyBot/blob/master/demo.gif?raw=true" alt="screenshot" width="220" align="right">
## :sparkles: Features
- Check if you have any projects wait for review
- Get your total earning since specific month and year.
- Exit from queue to review all your projects.
- Join queue to review all your projects.
[Unit]
Description=Eddie Client
After=multi-user.target
[Service]
Type=simple
WorkingDirectory =/opt/eddie/
ExecStart = sudo /opt/eddie/eddie-cli -connect -netlock.mode=Auto -login=USERNAME -password=PASSOWRD 'proxy.tor.control.port=9051' 'proxy.port=9050' 'proxy.host=127.0.0.1' 'proxy.mode=tor'
Restart=on-abort
#Generate pin command using openssl
openssl x509 -in yourCertificatePath.cer -inform DER -outform DER -noout -pubkey | openssl rsa -pubin -outform DER | openssl sha1 -hex
public static long currentTimeStamp() {
return (System.currentTimeMillis() / 1000);
}
@m4ary
m4ary / String date to timestamp
Created February 27, 2019 00:08
convert string date to timestamp
/*
Date format examples
date fromat - > string
MM/dd/yyyy -> 04/13/2015
dd-M-yyyy hh:mm:ss -> 13-4-2015 10:59:26
dd MMMM yyyy -> 13 April 2015
dd MMMM yyyy zzzz -> 13 April 2015 India Standard Time
E, dd MMM yyyy HH:mm:ss z -> Mon, 13 Apr 2015 22:59:26 IST
#Copy your ssh key to clipboard (tested on MacOS)
cat ~/.ssh/id_rsa.pub | pbcopy
@m4ary
m4ary / convert java object to HashMap.java
Last active February 13, 2019 07:11
convert java object to HashMap
public static Map<String, Object> ObjectToMap(Object obj) {
Map<String, Object> map = new HashMap<>();
for (Field field : obj.getClass().getDeclaredFields()) {
field.setAccessible(true);
try {
if (field.get(obj) != null) {
map.put(field.getName(), field.get(obj));
}
} catch (Exception ignored) {
}
@m4ary
m4ary / javaPart
Last active February 13, 2019 07:07
add Counter\Budget to NavigationView to specific item
// use this method in your fragment to update the counter
private void setMenuCounter(@IdRes int itemId, int count) {
NavigationView navigationView = Objects.requireNonNull(getActivity()).findViewById(R.id.nav_view);
TextView view = (TextView) navigationView.getMenu().findItem(itemId).getActionView();
view.setText(count > 0 ? String.valueOf(count) : null);
}