Skip to content

Instantly share code, notes, and snippets.

View eric-vader's full-sized avatar
🎯
Focusing

Eric Han eric-vader

🎯
Focusing
View GitHub Profile
@eric-vader
eric-vader / Nvidia Fedora FC28.sh
Created July 25, 2018 06:59
Nvidia Fedora FC28
sudo dnf config-manager --add-repo=https://negativo17.org/repos/fedora-nvidia.repo
sudo dnf install kernel-devel dkms dkms-nvidia nvidia-driver nvidia-settings vulkan.i686 nvidia-driver-libs.i686
sudo dkms autoinstall
@eric-vader
eric-vader / Android Studio
Created July 22, 2018 16:08
Android Studio
echo "
[Desktop Entry]
Name=Android Studio
Exec=/opt/google/android-studio/bin/studio.sh
Icon=/opt/google/android-studio/bin/studio.png
Type=Application" > ~/.local/share/applications/android-studio.desktop
@eric-vader
eric-vader / setup_ledger.sh
Last active May 28, 2018 01:58 — forked from ptantiku/setup_ledger.sh
Setup Ledger Nano S in Linux, with fixing problem on Fedora
#!/bin/bash
# Setup Ledger Nano S in Linux
# according to http://support.ledgerwallet.com/knowledge_base/topics/ledger-wallet-is-not-recognized-on-linux
# However, in Fedora, the "plugdev" group is not existed (obsolete).
# The solution is to replace `GROUP=\"plugdev\"` to `OWNER=\"<username>\"` in the script, for example:
# Original rule: SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0001", MODE="0660", GROUP="plugdev"
# Change to: SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0001", MODE="0660", OWNER="ptantiku"
#wget -q -O - https://www.ledgerwallet.com/support/add_udev_rules.sh | sed -re 's/GROUP=\\"plugdev\\"/OWNER=\\"'$(whoami)'\\"/' | sudo bash
#/bin/hash
###########################################################################################################
DATE=`/bin/date +date_%d-%m-%y_time_%H-%M-%S`
Time(){
###### STARTING PROGRAMMING AND TYPING THE USER INTERFACE ##########
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo "<br>"
echo " Computer Time : `date` <br>"
@eric-vader
eric-vader / test
Last active August 29, 2015 14:24
//============================================================================
// Name : test1.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <iostream>
#include <math.h>
@eric-vader
eric-vader / Nodes
Last active August 29, 2015 14:21
PrintTree
class Node(object):
def __init__(self, value, left=None, right=None):
self.value = value
self.left = left
self.right = right
def printTree(rootNode):
printTreeInternal([rootNode], 1, maxLevel(rootNode))
def printWhitespaces(count):