Skip to content

Instantly share code, notes, and snippets.

View antronic's full-sized avatar
👨‍🚀
Working from home

Jirachai Chansivanon antronic

👨‍🚀
Working from home
View GitHub Profile
@komkanit
komkanit / remove-avenger-spoiler.js
Last active April 24, 2019 05:09
REMOVE AVENGER SPOILER. copy this code and paste in console on your browser
var banList = ['avenger', 'infinity'];
setInterval(function() {
var a = document.querySelectorAll('[role="article"]')
a.forEach((d) => {
banList.map((text) => {
if (d.innerText.toLocaleLowerCase().indexOf(text) >= 0) {
console.log('removed');
d.remove()
}
})
@mvalipour
mvalipour / readme.md
Last active March 9, 2020 16:42
Transpile and Deploy ES6 node app to Azure app service using TeamCity and Octopus

Background

Web have a node application written in ES6/babel which cannot (yet) be run by the latest stable node engine. Locally we use babel-node to run the application using babel's on-the-fly transpiler; However this is strongly discourages on the production environment (due to memory and performance footprints).

So we would need to transpile our application to the stable ECMA and deploy the artefacts to Azure -- instead of the original app.

Why not use kudu?

@nantcom
nantcom / getbathtext.js
Last active April 29, 2020 04:37
Get Thai Baht Text using JavaScript
var getBathText = function (inputNumber) {
var getText = function (input) {
var toNumber = input.toString();
var numbers = toNumber.split('').reverse();
var numberText = "/หนึ่ง/สอง/สาม/สี่/ห้า/หก/เจ็ด/แปด/เก้า/สิบ".split('/');
var unitText = "/สิบ/ร้อย/พ้น/หมื่น/แสน/ล้าน".split('/');
var output = "";
@pirafrank
pirafrank / uninstall_office_2016.sh
Last active March 21, 2024 14:12
Uninstall Office 2016 from OS X completely
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo -e "
ROOT PRIVILEDGES NEEDED!
You have to run this script as root.
Aborting...
"
exit 1
else
@koistya
koistya / ReactJS-Server-Side-Rendering.md
Last active September 15, 2023 07:32
Server-side Rendering (SSR) for ReactJS / Flux Applications. Setting document.title

Files

The basic structure of a React+Flux application (see other examples)

 - /src/actions/AppActions.js     - Action creators (Flux)
 - /src/components/Application.js - The top-level React component
 - /src/constants/ActionTypes.js  - Action types (Flux)
 - /src/core/Dispatcher.js        - Dispatcher (Flux)
 - /src/stores/AppStore.js        - The main store (Flux)
@phlbnks
phlbnks / Pure CSS Offsets
Last active July 23, 2019 08:01
CSS to add offsets to Pure grids http://purecss.io/
/*
Offsets from https://raw.githubusercontent.com/tilomitra/pure/d7f85e37abec3fdab14a541305ad05783159655c/src/grids/css/grids-offsets.css
Media queries from Pure v0.5.0
Copyright 2014 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
https://github.com/yui/pure/blob/master/LICENSE.md
*/
@media screen and (min-width: 35.5em) {
.offset-sm-0 {
margin-left:0;