Skip to content

Instantly share code, notes, and snippets.

View aalfiann's full-sized avatar
🏠
Working from home

M ABD AZIZ ALFIAN aalfiann

🏠
Working from home
View GitHub Profile
@aalfiann
aalfiann / MySql-5.6-installation guide.md
Created September 14, 2022 08:11 — forked from vinodpandey/MySql-5.6-installation guide.md
Install MySQL 5.6.xx on Ubuntu 18.04 & Ubuntu 20.04

MySQL Download URL

https://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.46-linux-glibc2.12-x86_64.tar.gz

Open the terminal and follow along:

  • Uninstall any existing version of MySQL
sudo rm /var/lib/mysql/ -R
@aalfiann
aalfiann / getMoonPhase.js
Created June 14, 2022 19:33 — forked from endel/getMoonPhase.js
Get Moon Phase by Date, written in JavaScript
/*
* modified from http://www.voidware.com/moon_phase.htm
*/
function getMoonPhase(year, month, day)
{
var c = e = jd = b = 0;
if (month < 3) {
year--;
@aalfiann
aalfiann / gist:5df657e1b3a60ccf6740d02d9d0116ee
Created April 22, 2022 09:20 — forked from singhabhinav/gist:132b8196abac026b43fa
Install SSL certificate in Nginx (Using .crt & .ca-bundle certificate files)
Step 1 - Create .crt file
cat domainname.crt domainname.ca-bundle > domainname-ssl-bundle.crt
Step 2-
Add lines for ssl_certificate in nginx configuration
server {
listen 80 default_server;
@aalfiann
aalfiann / figma-mouse-wheel.user.js
Created April 20, 2021 06:18 — forked from ar-nelson/figma-mouse-wheel.user.js
Greasemonkey script to fix slow Figma mouse wheel scrolling in Firefox on Linux
// ==UserScript==
// @name Figma Mouse Wheel Speed Fix
// @namespace https://adam.nels.onl
// @match https://www.figma.com/*
// @grant none
// ==/UserScript==
// Mouse wheel scrolling in Figma on Firefox + Linux is unbearably slow.
//
// This script catches all mouse wheel events on the main canvas,
@aalfiann
aalfiann / GoogleDorking.md
Created April 14, 2021 11:48 — forked from sundowndev/GoogleDorking.md
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"
@aalfiann
aalfiann / hello-world-node-fastify-clustered.js
Created February 3, 2020 09:12 — forked from robinglen/hello-world-node-fastify-clustered.js
Simple hello world in Node, using Fastify and clustering for Medium post
const cluster = require('cluster');
const numCPUs = require('os').cpus().length;
const fastify = require('fastify')();
const port = 8123;
if (cluster.isMaster) {
console.log(`Master ${process.pid} is running`);
for (let i = 0; i < numCPUs; i++) {
cluster.fork();
}
@aalfiann
aalfiann / useHexo.md
Created November 9, 2019 15:09 — forked from btfak/useHexo.md
How to use Hexo and deploy to GitHub Pages
#!/bin/bash
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
DISTRO=
OS=
if grep 'Debian' /etc/issue > /dev/null 2>&1 ; then
@aalfiann
aalfiann / client.js
Created August 6, 2019 11:59 — forked from PaulMougel/client.js
File upload in Node.js to an Express server, using streams
// node: v0.10.21
// request: 2.27.0
var request = require('request');
var fs = require('fs');
var r = request.post("http://server.com:3000/");
// See http://nodejs.org/api/stream.html#stream_new_stream_readable_options
// for more information about the highWaterMark
// Basically, this will make the stream emit smaller chunks of data (ie. more precise upload state)
var upload = fs.createReadStream('f.jpg', { highWaterMark: 500 });
@aalfiann
aalfiann / postman_install.sh
Created August 1, 2019 04:38 — forked from cagcak/postman_install.sh
Postman install Ubuntu 18.04
#!/bin/bash
# Get postman app
wget https://dl.pstmn.io/download/latest/linux64 -O postman.tar.gz
sudo tar -xzf postman.tar.gz -C /opt
sudo ln -s /opt/Postman/Postman /usr/bin/postman
#Create a Desktop Entry
cat > ~/.local/share/applications/postman.desktop <<EOL
[Desktop Entry]
Encoding=UTF-8