Skip to content

Instantly share code, notes, and snippets.

View phuongtailtranminh's full-sized avatar

Tran Minh Phuong phuongtailtranminh

  • Hanoi
View GitHub Profile
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:
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:
# 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 / Spring Roo
Last active December 5, 2016 04:13
Spring Roo
web mvc scaffold --class ~.web.PkgSmsLMCycleController --backingType ~.domain.PkgSmsLMCycle --path admin/pkgsmslmcycle
web mvc scaffold --class ~.web.PkgDataController --backingType ~.domain.PkgData --path admin/pkgdatacfg
@phuongtailtranminh
phuongtailtranminh / EDX - Disable Discussion Tab
Last active November 30, 2016 16:09
/edx/app/edxapp/edx-platform/lms/templates/courseware/tabs.html
## 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" />
<%
@phuongtailtranminh
phuongtailtranminh / List Servers you may need
Last active December 4, 2016 13:36
List Servers you may need
https://console.cloud.google.com/freetrial?page=0 (Sign up and get $300 to spend on Google Cloud Platform over the next 60 days. Credit Card with $ is required)
https://amazonlightsail.com/ (starting from 5$/month)
https://cloud.digitalocean.com/login (free with Github Student Pack, require Paypal)
@phuongtailtranminh
phuongtailtranminh / MySQL
Last active December 5, 2016 14:54
MySQL
# Fix mysqld start fail: (when backup server)
vim /etc/mysql/my.cnf -->
[mysqld]
innodb_force_recovery = 3
# Backup:
mysqldump -u root -p[password] [database_name] > dumpfilename.sql
# Restore:
mysql -u root -p[password] [database_name] < dumpfilename.sql
# Create user
CREATE USER 'finley'@'localhost' IDENTIFIED BY 'some_pass';
@phuongtailtranminh
phuongtailtranminh / iptables_rules.sh
Created December 3, 2016 14:02 — forked from virtualstaticvoid/iptables_rules.sh
25 Most Frequently Used Linux IPTables Rules Examples
# Modify this file accordingly for your specific requirement.
# http://www.thegeekstuff.com
# 1. Delete all existing rules
iptables -F
# 2. Set default chain policies
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT DROP
LightHouse aka Audit 2.0 (https://github.com/GoogleChrome/lighthouse) - Lighthouse analyzes web apps and web pages, collecting modern performance metrics and insights on developer best practices.
@phuongtailtranminh
phuongtailtranminh / Json Response Format Example
Last active February 25, 2024 14:31
Json Response Format Example
* Use Json Web Token (JWT) for authorization [https://jwt.io/]
- Flickr
Request Format: GET or POST [https://www.flickr.com/services/api/request.rest.html]
Successful Responses:
{
"stat": "ok",
"blogs": {
"blog": [
{