Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Nguyễn Nhật Hoàng codeaholicguy

🎯
Focusing
Block or report user

Report or block codeaholicguy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View test.json
{
"fbPageId": "1093212670720847",
"campaign": {
"id": 1,
"pageId": 4,
"name": "Test campaign",
"description": "Test campaign",
"campaignGroupId": null,
"launchAt": null,
"isNewsLetter": true,
View campaign.js
{
contents: [
{
id: 1,
order: 1,
text: 'Xin chào',
links: []
},
{
id: 2,
View docker-compose.yml
version: "3"
services:
app:
build: .
ports:
- "3000:3000"
environment:
- MONGO_URL=mongodb://mongo:27017
depends_on:
- mongo
View docker-compose.yml
version: "3"
services:
app:
build: .
ports:
- "3000:3000"
environment:
- MONGO_URL=mongodb://mongo:27017
depends_on:
- mongo
View Dockerfile
FROM node:8
# Create app directory
WORKDIR /usr/src/app
# Install app dependencies
COPY package*.json ./
RUN npm install
# Copy app source code
View background.js
const targetPage = 'https://services.giaohangtietkiem.vn/*'
const addTokenHeader = (e) => {
e.requestHeaders.push({name: 'Token', value: 'token'})
return {requestHeaders: e.requestHeaders}
}
browser.webRequest.onBeforeSendHeaders.addListener(
addTokenHeader,
{urls: [targetPage]},
['blocking', 'requestHeaders']
View manifest.json
{
"permissions": [
"webRequest",
"webRequestBlocking",
"https://services.giaohangtietkiem.vn/"
],
"background": {
"scripts": ["background.js"]
}
}
View package.json
{
"scripts": {
"build": "NODE_ENV=production parcel build src/index.html -d dist --detailed-report --no-source-maps",
"clean": "rimraf dist",
"prebuild": "yarn run clean && mkdir dist && cp -R src/public/* dist",
}
}
View manifest.json
{
"manifest_version": 2,
"name": "Giao hàng tiết kiệm",
"description": "Giao hàng tiết kiệm",
"version": "0.0.1",
"browser_action": {
"default_popup": "index.html",
"default_title": "Open the popup"
},
"icons": {
@codeaholicguy
codeaholicguy / .gitconfig_difftool
Last active Jun 13, 2018
Use nvim as difftool
View .gitconfig_difftool
[merge]
tool = vimdiff
[mergetool]
prompt = true
[mergetool "vimdiff"]
cmd = nvim -d $LOCAL $MERGED $MERGED -c '$wincmd w' -c '$wincmd J'
[difftool]
prompt = false
[diff]
tool = vimdiff
You can’t perform that action at this time.