Skip to content

Instantly share code, notes, and snippets.

View lamnk's full-sized avatar

lamnk lamnk

View GitHub Profile

Keybase proof

I hereby claim:

  • I am lamnk on github.
  • I am lamnk (https://keybase.io/lamnk) on keybase.
  • I have a public key ASBFttMoQ1J4pfxJec80ia5tAfyS3OdCTlqsUP5VGJiBugo

To claim this, I am signing this object:

@lamnk
lamnk / api_response.json
Last active July 23, 2018 14:36
Chappi API resonpse
{
"pipelines": [
[
"transform/topics/best",
[]
],
[
"transform/tagged/top",
[
[
@lamnk
lamnk / example.com.conf
Created June 11, 2016 18:00
Nginx virtual host config with SSL and Layer
server {
server_name www.example.com example.com;
listen 80;
return 301 https://www.example.com$request_uri;
}
server {
server_name example.com;
listen 443 ssl;
return 301 https://www.$host$request_uri;
https://deca.vn/me-va-be/dinh-duong/sua-bot-cho-be/sua-morinaga-so-2-850g-406-36-thang41-sp6516l10.html
<product id="6516">
<name>Sữa Morinaga số 2 850g &#40;6 - 36 tháng&#41;</name>
<producturl>http://deca.vn/shoptretho/me-va-be/dinh-duong/sua-bot-cho-be/sua-morinaga-so-2-850g-406-36-thang41-ghsp2740l10.html?utm_source=criteo&amp;utm_medium=retargeting-TP-142-hailt1</producturl>
<bigimage>http://img.deca.vn/upload/2-2015/anh_san_pham/2015-04-21/1429606251_suabot_170x170.jpg</bigimage>
<price>427500</price>
<categoryid1>Mẹ và bé</categoryid1>
<description></description>
<retailprice>450000</retailprice>
@lamnk
lamnk / datalayer.js
Last active August 29, 2015 14:17
DataLayer Criteo Deca
dataLayer = [{
'transactionId': 'DC69014976',
'transactionAffiliation': 'pethouse',
'transactionTotal': 181500,
'transactionTax': 0,
'transactionShipping': 0,
'transactionProducts': [{
'sku': 'JP159',
'name': 'Sữa tắm khô hương Lavender JP159',
'category': '642',
@lamnk
lamnk / setup.sh
Last active December 19, 2015 06:59
Setup 24H Ubuntu
#!/bin/bash
#echo "**********************************\n"
#echo "Add partner repo to install Skype and Flash\n\n\n"
#add-apt-repository "deb http://archive.canonical.com/ $(lsb_release -sc) partner"
#echo "**********************************\n"
#echo "Add ubuntu-tweak repo\n\n\n"
#add-apt-repository -y ppa:tualatrix/ppa
@lamnk
lamnk / ssh-copy-id
Created May 7, 2012 01:44
ssh-copy-id
#!/bin/sh
# Shell script to install your id_rsa.pub on a remote machine
# Takes the remote machine name as an argument.
# Obviously, the remote machine must accept password authentication,
# or one of the other keys in your ssh-agent, for this to work.
ID_FILE="${HOME}/.ssh/id_rsa.pub"
if [ "-i" = "$1" ]; then
@lamnk
lamnk / csf
Created May 4, 2012 01:59
Csf on a Xen VPS - Centos
[root@apache3]/etc/csf# lsmod
Module Size Used by
[root@apache3]/etc/csf# modprobe ip_tables
FATAL: Could not load /lib/modules/2.6.18-274.7.1.el5.028stab095.1PAE/modules.dep: No such file or directory
[root@apache3]/etc/csf# csf -s
Flushing chain `INPUT'
Flushing chain `FORWARD'
Flushing chain `OUTPUT'
@lamnk
lamnk / rbx-head-gem
Created May 4, 2012 01:26
rbx-head error with gem
% gem
An exception occurred running /home/lamnk/.rvm/rubies/rbx-head/lib/bin/gem.rb
Missing or uninitialized constant: Psych::Parser (NameError)
Backtrace:
Module#const_missing at kernel/common/module.rb:468
Psych::Nodes::Stream.__class_init__ (Stream) at .rvm/rubies/rbx-head/lib/19
/psych/nodes/stream.rb:12
Psych::Nodes.__module_init__ (Nodes) at .rvm/rubies/rbx-head/lib/19/psych/nodes
/stream.rb:7
@lamnk
lamnk / pypy_symlink.sh
Created December 12, 2011 00:17
Some symlinks needed to run pypy on CentOS 5.7 x64