Skip to content

Instantly share code, notes, and snippets.

!function(){function a(){v=0==v?Object.keys(u)[1]:v;var a={};return $.each(document.location.search.substr(1).split("&"),function(t,i){var e=i.split("=");try{a[e[0].toString()]=e[1].toString()}catch(n){}}),isNaN(a.variant)?variant_id=$('[name="id"]').val():a.variant?variant_id=a.variant:variant_id=$("select option[value='"+v+"']").parent().val(),variant_id||v}function t(t){return t||(t=a()),variant_images=u.hasOwnProperty(t)?u[t]:u[v],variant_images?("at_start"==m?variant_images=u.g.concat(variant_images):"at_end"==m&&(variant_images=variant_images.concat(u.g)),variant_images):p}function i(a,t){return JSON.stringify(a)===JSON.stringify(t)}var e=!1,n=!1,r="Shoptimized",o=!1,d=!1,s={};if("/"!=window.location.pathname||"Startup"!=r&&"Flow"!=r){if(window.location.href.toLowerCase().indexOf("/products/")>=0)o=!0;else if(e)var l=setInterval(function(){window.$&&window.jQuery&&clearInterval(l)},10)}else o=!0,d=!0;if(o){if(d){if("Startup"==r)var c=$('[data-section-type="featured-product"] .product-title a').prop("hre
8595 - Thời Trang Nữ / Áo / Áo Croptop
8598 - Thời Trang Nữ / Áo / Áo sơ mi
6129 - Thời Trang Nữ / Áo / Khác
8596 - Thời Trang Nữ / Áo / Áo hai dây & Áo ba lỗ
8599 - Thời Trang Nữ / Áo / Áo thun
8597 - Thời Trang Nữ / Áo / Áo kiểu
8612 - Thời Trang Nữ / Áo khoác & Áo vest / Áo khoác jeans
8608 - Thời Trang Nữ / Áo khoác & Áo vest / Áo khoác da
6127 - Thời Trang Nữ / Áo khoác & Áo vest / Khác
10922 - Thời Trang Nữ / Áo khoác & Áo vest / Bomber jackets
@nhtera
nhtera / ts-to-mp4.py
Created April 9, 2017 18:42
Convert all videos .ts to .mp4 using ffmpeg
#!/usr/local/opt/python/bin/python2.7
# Required ffmpeg
import os
import sys
walk_dir = os.getcwd()
count = 0
for root, subdirs, files in os.walk(walk_dir):
for file in files:
@nhtera
nhtera / autosubdir.py
Last active April 9, 2017 16:47
MacOSX - Scan dir auto-generating subtitles for any video file (*.mp4)
#!/usr/local/opt/python/bin/python2.7
# Install autosub first by follow the instruction: https://github.com/agermanidis/autosub
import os
import sys
walk_dir = os.getcwd()
count = 0
for root, subdirs, files in os.walk(walk_dir):
for file in files:
@nhtera
nhtera / component.js
Created July 1, 2016 02:48 — forked from efernandesng/component.js
react-intl injectIntl decorator
import React, {Component, PropTypes} from 'react';
import {intlShape} from 'react-intl';
import {injectIntl} from './decorator';
@injectIntl()
class Xpto extends Component {
static propTypes = {
intl: intlShape.isRequired
};
@nhtera
nhtera / OpenWithVisualStudioCode.bat
Created December 14, 2015 08:29
Open folders and files with Visual Studio Code from windows explorer context menu (tested in Windows 10)
@echo off
SET codePath=C:\Program Files (x86)\Microsoft VS Code\code.exe
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Visual Studio Code" /t REG_SZ /v "" /d "Open with Visual Studio Code" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Visual Studio Code" /t REG_EXPAND_SZ /v "Icon" /d "%codePath%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Visual Studio Code\command" /t REG_SZ /v "" /d "%codePath% \"%%1\"" /f
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Visual Studio Code" /t REG_SZ /v "" /d "Open with Visual Studio Code" /f
@nhtera
nhtera / OpenWithSublimeText3.bat
Last active December 14, 2015 08:27 — forked from roundand/OpenWithSublimeText3.bat
Open folders and files with Sublime Text 3 from windows explorer context menu (tested in Windows 10)
@echo off
SET st3Path=C:\Program Files\Sublime Text 3\sublime_text.exe
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3Path% \"%%1\"" /f
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f