Steps to deploy Node.js to VPS using PM2 and Github Actions
Discover gists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# put your network device into monitor mode | |
# Turn off Int | |
Set interface down | |
sudo ip link set wlan0 down | |
# Set monitor mode | |
iwconfig wlan0 mode monitor | |
# Turn up interface | |
ip link set wlan0 up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var phoneNumber = '08111111'; //nomor yang akan di test | |
$.each(operators, function(service, operator) { | |
//console.log("%o : %o ", service, operator); | |
if (operator["pattern"].test(phoneNumber)) { | |
//do some thing with here or simple alert (for testing) | |
alert("%s iku cocok karo: $s -> jeneng produk'e: $s soko operator %s", phoneNumber, operator["pattern"], service, operator["name"]); | |
else | |
console.log("%s iku gak cocok: $o", phoneNumber, operator); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ec2 = require('@aws-cdk/aws-ec2'); | |
import ecs = require('@aws-cdk/aws-ecs'); | |
import elbv2 = require('@aws-cdk/aws-elasticloadbalancingv2'); | |
import cdk = require('@aws-cdk/core'); | |
class PublicFargateService extends cdk.Stack { | |
constructor(scope: cdk.App, id: string) { | |
super(scope, id); | |
// Create VPC and Fargate Cluster |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
- Follow standard conventions.
- Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
- Boy scout rule. Leave the campground cleaner than you found it.
- Always find root cause. Always look for the root cause of a problem.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\definecolor{delim}{RGB}{20,105,176} | |
\definecolor{numb}{RGB}{106, 109, 32} | |
\definecolor{string}{rgb}{0.64,0.08,0.08} | |
\lstdefinelanguage{json}{ | |
numbers=left, | |
numberstyle=\small, | |
frame=single, | |
rulecolor=\color{black}, | |
showspaces=false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 에러의 원인 | |
// 따로 User-Agent 값을 추가하지 않으면 기본값으로 `Dart/<version> (dart:io)` 가 들어갑니다. | |
// (https://api.flutter.dev/flutter/dart-io/HttpClient/userAgent.html) | |
// 이 값을 지우고 브라우저에서 사용하는 값으로 바꿔줍니다. | |
// (브라우저 값이 아니면 네이버에서 차단하는걸로 보입니다) | |
// 방법 1. (local? override) | |
// [home_screen.dart] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
# coding: utf-8 | |
import os,socket,threading,time | |
#import traceback | |
allow_delete = False | |
#local_ip = socket.gethostbyname(socket.gethostname()) | |
local_ip = ('192.168.1.146') | |
local_port = 21 |
NewerOlder