Skip to content

Instantly share code, notes, and snippets.

View nguyenbathanh's full-sized avatar

Thanh Nguyen nguyenbathanh

View GitHub Profile
@nguyenbathanh
nguyenbathanh / gist:8b658031c519f76859e13db893c3fab2
Last active January 3, 2018 14:55
Opening Sublime Text on command line as subl on Mac OS? (one line command)
sudo ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/
@nguyenbathanh
nguyenbathanh / config
Last active January 3, 2018 14:51
My sublime settings
{
// "auto_complete_cycle": true,
"caret_extra_bottom": 1,
"caret_extra_top": 2,
"caret_extra_width": 1,
"caret_style": "blink",
"drag_text": false,
"draw_white_space": "none",
// "ensure_newline_at_eof_on_save": true,
"folder_exclude_patterns":
@nguyenbathanh
nguyenbathanh / update-to-php5.6-on-ubuntu-14.04.sh
Created August 10, 2017 14:01 — forked from eyecatchup/update-to-php5.6-on-ubuntu-14.04.sh
Update PHP 5.x to PHP 5.6 on Ubuntu 14.04
#!/bin/sh
# In case df shows >90% for /boot run:
#sudo apt-get autoremove
# Add repository
sudo add-apt-repository ppa:ondrej/php
# Install required packages
sudo apt-get update
// Place your settings in this file to overwrite the default settings
{
"editor.fontFamily": "DejaVu Sans Mono",
// "files.trimTrailingWhitespace": true,
"editor.fontSize": 14,
"editor.tabSize": 2,
"files.eol": "\n",
"editor.cursorBlinking": "smooth",
"search.exclude": {
"**/.git": true,
$spinner-color: #69717d !default
$spinner-size: 48px !default
.overlay
background: rgba(black,.8)
height: 100vh
.spinner
font-size: $spinner-size
position: relative
@nguyenbathanh
nguyenbathanh / foo.log
Created May 15, 2017 09:12 — forked from ibeex/foo.log
Flask logging example
A warning occurred (42 apples)
An error occurred
@nguyenbathanh
nguyenbathanh / gist:3f78dad52471a43691c7bc58978689e8
Created May 1, 2017 08:53
Set custom user agent of Chrome on start
--disable-directwrite-for-ui --user-agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.81 Safari/537.36"
@nguyenbathanh
nguyenbathanh / Preferences.sublime-settings
Last active April 24, 2017 02:36
My sublime settings
{
"theme": "Autumn.sublime-theme",
"drag_text": false,
"folder_exclude_patterns": [
".svn",
".git",
".hg",
"CVS",
"node_modules"
],
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru" lang="ru">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<title>���������</title>
<meta name="description" content="��������� - ������ ���������� ���� �������� ��������� ���������� � ������� ���" />
<meta name="keywords" content="�����, ���������, �������, ������, ������������, �������" />
<meta name="generator" content="DataLife Engine (http://dle-news.ru)" />
<link rel="search" type="application/opensearchdescription+xml" href="http://www.klassprof.org/engine/opensearch.php" title="���������" />
<link rel="alternate" type="application/rss+xml" title="���������" href="http://www.klassprof.org/rss.xml" />
@nguyenbathanh
nguyenbathanh / isint.js
Last active February 23, 2017 10:45
Javascript check input is integer or not.
function isInt(value) {
return !isNaN(value) && (function(x) { return (x | 0) === x; })(parseFloat(value))
}