Assuming that you have already installed Node.js on your system. If you haven't visit https://nodejs.org/en/download/package-manager/
sudo nano /lib/systemd/system/mygreatestapp.service
Put the following contents in it;
[Unit]
## From a post on the ML, apropos this: | |
## http://lowlatencyweb.wordpress.com/2012/03/20/500000-requestssec-modern-http-servers-are-fast. | |
## For sysctl.conf | |
net.ipv4.tcp_slow_start_after_idle = 0 | |
echo "1768 64512" > /proc/sys/net/ipv4/ip_local_port_range | |
echo 1 > /proc/sys/net/ipv4/tcp_tw_recycle | |
echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse |
//events - a super-basic Javascript (publish subscribe) pattern | |
var events = { | |
events: {}, | |
on: function (eventName, fn) { | |
this.events[eventName] = this.events[eventName] || []; | |
this.events[eventName].push(fn); | |
}, | |
off: function(eventName, fn) { | |
if (this.events[eventName]) { |
Assuming that you have already installed Node.js on your system. If you haven't visit https://nodejs.org/en/download/package-manager/
sudo nano /lib/systemd/system/mygreatestapp.service
Put the following contents in it;
[Unit]
# === Optimized my.cnf configuration for MySQL/MariaDB (on Ubuntu, CentOS, Almalinux etc. servers) === | |
# | |
# by Fotis Evangelou, developer of Engintron (engintron.com) | |
# | |
# ~ Updated December 2021 ~ | |
# | |
# | |
# The settings provided below are a starting point for a 8-16 GB RAM server with 4-8 CPU cores. | |
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage. | |
# |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset='UTF-8' /> | |
<style type="text/css"> | |
<!-- | |
.chat_wrapper { | |
width: 500px; | |
margin-right: auto; | |
margin-left: auto; |
# Sebagai kelanjutan dari script saya sebelumnya (save_screenshot.py) | |
# Script ini membuka laman kpu, memilih berurutan Propinsi, Kabupaten, Kecamatan, Kelurahan dan TPS | |
# Di penghujung proses, dilakukan penyimpanan screenshot. | |
# Sebagai POC, saya batasi saja 5 TPS | |
from selenium import webdriver | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
from datetime import datetime | |
import time |
Here's a 'simple' way to get the YouTube subscriber number from Google's Youtube API v3:
<?php | |
// Constants | |
$FIREBASE = "_YOUR_FIREBASE_URL_"; | |
$NODE_DELETE = "temperature.json"; | |
$NODE_GET = "temperature.json"; | |
$NODE_PATCH = ".json"; | |
$NODE_PUT = "temperature.json"; | |
// Data for PUT |
Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.
In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.
Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j