Skip to content

Instantly share code, notes, and snippets.

View tajidyakub's full-sized avatar
💭
The time has come.

Tajid Yakub tajidyakub

💭
The time has come.
View GitHub Profile
@tajidyakub
tajidyakub / inter.css
Created September 23, 2022 16:46
Inter and Metropolis font types
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 100;
font-display: swap;
src: url("/fonts/Inter-Thin.woff2?v=3.19") format("woff2"),
url("/fonts/Inter-Thin.woff?v=3.19") format("woff");
}
@font-face {
font-family: 'Inter';
@tajidyakub
tajidyakub / mysql-alter-authentication.md
Created April 26, 2020 10:50
Alter mysql 8 user authentication to native.

Mysql version 8 shipped with the latest version of major Linux distros could made some php application stop working, namely WordPress - need to research furthermore on the why.

Creating a user designated to be used by WordPress with using mysql_native_password authentication seems to solve this issue.

mysql> CREATE USER 'dbuser'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';

Or alter the existing user.

@tajidyakub
tajidyakub / README.md
Created August 22, 2018 09:04 — forked from mrbar42/README.md
Secured HLS setup with Nginx as media server

Secured HLS setup with Nginx as media server

This example is part of this article.

This is an example for an HLS delivery with basic security. Nginx compiled with nginx-rtmp-module & secure-link is used as media server. Features:

  • Domain filtering
  • Referrer filtering
  • Embed buster
@tajidyakub
tajidyakub / api.js
Last active July 23, 2023 11:33
Memanfaatkan feathers-vuex untuk melakukan integrasi data antara feathers supplied dengan local store menggunakan Vuex.
import feathers from '@feathersjs/feathers'
import socketio from '@feathersjs/socketio-client'
import auth from '@feathersjs/authentication-client'
import io from 'socket.io-client'
const socket = io('http://localhost:4937', { transports: ['websocket'] })
const Api = feathers()
.configure(socketio(socket))
.configure(auth({ storage: window.localStorage }))
@tajidyakub
tajidyakub / .htaccess
Last active September 20, 2018 23:17
Redirect 301 to another domain .htaccess Apache in cPanel.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.com [NC,OR]
RewriteCond %{HTTP_HOST} ^www.domain.com [NC]
RewriteRule ^(.*)$ https://domain.co/$1 [L,R=301,NC]
upstream app_server {
ip_hash;
server app_react:3000 max_fails=3 fail_timeout=30s;
}
upstream api_server {
ip_hash;
server api_feathers:3040 max_fails=3 fail_timeout=30s;
}
@tajidyakub
tajidyakub / cloud-sql-proxy.service
Created August 1, 2018 16:10 — forked from goodwill/cloud-sql-proxy.service
Example Systemd file for starting cloud sql proxy at system start
[Install]
WantedBy=multi-user.target
[Unit]
Description=Google Cloud Compute Engine SQL Proxy
Requires=networking.service
After=networking.service
[Service]
Type=simple
@tajidyakub
tajidyakub / certbot-dns-challenges.md
Created August 1, 2018 00:52
Obtaining let's encrypt certificate using dns as the preferred challenge
$ certbot certonly --manual --cert-name <cert-name> -d <host.domain.name> --agree-tos -m <[email protected]> --preferred-challenge dns-01 
@tajidyakub
tajidyakub / Instructions.sh
Created July 31, 2018 13:45 — forked from GhazanfarMir/Instructions.sh
Install PHP7.2 NGINX and PHP7.2-FPM on Ubuntu 16.04
########## Install NGINX ##############
# Install software-properties-common package to give us add-apt-repository package
sudo apt-get install -y software-properties-common
# Install latest nginx version from community maintained ppa
sudo add-apt-repository ppa:nginx/stable
# Update packages after adding ppa
@tajidyakub
tajidyakub / Gruntfile.js
Last active July 9, 2018 13:00
Grunt config file for deployment via rsync
let remotepath = 'user@serveralias:/var/www/domain.tld/htdocs/wp-content/themes/projectname';
module.exports = function (grunt) {
grunt.initConfig({
rsync: {
options: {
args: ["--verbose"],
exclude: ["styles/*.*", ".git*", "*.scss", "node_modules"],
recursive: true
},