Skip to content

Instantly share code, notes, and snippets.

Avatar

Tran Minh Phuong phuongtailtranminh

  • Hanoi
View GitHub Profile
View gist:3bd64194bcd374c34cc2
###############################
# _ #
# | |_ _ __ ___ _ ___ __ #
# | __| '_ ` _ \| | | \ \/ / #
# | |_| | | | | | |_| |> < #
# \__|_| |_| |_|\__,_/_/\_\ #
# #
###############################
############################################################################
View PumperController.html
<!DOCTYPE html>
<html>
<head>
<title>Arduino Controller</title>
</head>
<body background="http://www.wallpapersonview.com/wallpapers/4/abstract_colorful_textures_widescreen_desktop_background_picture-371.jpg">
<div class="page-header" align="center">
<h1 style="color: white">Pumper Controller</h1>
<h4 id="timer" style="color: white">Running time: 0 (s)</h4>
View Active Windows Photo on Windows 10
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Applications\photoviewer.dll]
[HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell]
[HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell\open]
“MuiVerb”=”@photoviewer.dll,-3043”
[HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell\open\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,72,00,75,00,\
6e,00,64,00,6c,00,6c,00,33,00,32,00,2e,00,65,00,78,00,65,00,20,00,22,00,25,\
00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,46,00,69,00,6c,00,65,00,73,00,\
@phuongtailtranminh
phuongtailtranminh / gist:5fcf99cab4084d2d53bee71dbbfc21c8
Created Aug 24, 2016
Find the maximum number between 2 positive integers (without compare operation, ternary operation)
View gist:5fcf99cab4084d2d53bee71dbbfc21c8
int getMax(int a, int b) {
return ((a + b) + abs(a - b))/2
}
View gist:5fc130605879483cefda633f560e25ad
public class VasgateParser {
private static final Logger log = LoggerFactory.getLogger(VasgateParser.class);
private final String fileName;
private static final int INDEX_OF_PHONE_NUMBER = 0;
public VasgateParser(String fileName) {
this.fileName = fileName;
}
View VirtualBox useful command
# The vboxmanage is located at:
\path\to\virtualbox (example: ..\Oracle\VirtualBox)
# Clone a virtual machine (with Virtual Machine name) to specific folder:
vboxmanage clonevm Funix --basefolder D:\VMWare
View gist:eb1b86599d6cdbf8a35479cfa54ed1d1
Reading package lists...
Building dependency tree...
Reading state information...
python-software-properties is already the newest version.
The following package was automatically installed and is no longer required:
libt1-5
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 166 not upgraded.
OK
You are about to add the following PPA to your system:
View gist:638d1f881dfd146f80bbd0dedf23de8f
Reading package lists...
Building dependency tree...
Reading state information...
python-software-properties is already the newest version.
The following package was automatically installed and is no longer required:
libt1-5
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 166 not upgraded.
OK
You are about to add the following PPA to your system:
View Maven
# Install third party library to local maven repository
mvn install:install-file -Dfile=/path/to/file.jar -DgroupId=groupId -DartifactId=artifactId -Dversion=version -Dpackaging=jar
@phuongtailtranminh
phuongtailtranminh / EDX - Disable Discussion Tab
Last active Nov 30, 2016
/edx/app/edxapp/edx-platform/lms/templates/courseware/tabs.html
View EDX - Disable Discussion Tab
## mako
<%namespace name='static' file='/static_content.html'/>
<%!
from django.utils.translation import ugettext as _
from django.core.urlresolvers import reverse
%>
<%page args="tab_list, active_page, default_tab, tab_image" expression_filter="h" />
<%