Skip to content

Instantly share code, notes, and snippets.

View ridhof's full-sized avatar

Ridho Febriansa ridhof

View GitHub Profile
@defaultcf
defaultcf / sticky_chat.user.js
Last active April 10, 2021 12:55
YouTube Sticky LiveChat
// ==UserScript==
// @name YouTube Sticky Live Chat
// @name:ja YouTube Sticky Live Chat
// @namespace https://i544c.github.io
// @version 0.4.1
// @description Pin the latest message written by live owner or moderator to the top
// @description:ja 生放送主とモデレータの最新のコメントを上に固定するユーザスクリプト
// @author i544c
// @match https://www.youtube.com/live_chat*
// @match https://www.youtube.com/live_chat_replay*
@tegarimansyah
tegarimansyah / app.py
Created April 17, 2019 13:41
Belajar Flask + SQLAlchemy
from flask import Flask, request, jsonify
from flask_sqlalchemy import SQLAlchemy
# http://flask-sqlalchemy.pocoo.org/2.3/quickstart/#a-minimal-application
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+pymysql://my_user:my_password@127.0.0.1/my_database'
db = SQLAlchemy(app)
@DerEnderKeks
DerEnderKeks / WebhookTutorial.md
Last active December 4, 2023 20:28
Simple Webhook Tutorial (Twitter -> Discord using IFTTT)

Simple Webhook Tutorial

In this tutorial, I will be explaining how to set up a simple webhook to relay your tweets to a Discord channel.

Step 1 - Register on IFTTT

  1. Go to https://ifttt.com/ and create an account (if you don't already have one).

Step 2 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send Tweets.

  2. In the settings for that channel, find the Webhooks option and create a new webhook.

@dianjuar
dianjuar / Restore the GRUB Bootloader.md
Last active May 25, 2024 05:44
Restore the GRUB Bootloader on Manjaro Linux. Usefull when your fresh windows install eats your grub and can not boot into your linux installation, or for some how your grub is missing

Restore the GRUB Bootloader on Manjaro

  1. Chroot into your linux instalation
    1. The easiest way is with mhwd-chroot
      1. Install it yaourt -S mhwd-chroot
      2. Run it sudo mhwd-chroot
      3. DONE, you have chrooted into your linux installation (open a root console of your installed linux OS, is like just open a console with root access)
  2. Restore your GRUB
    1. Install a new GRUB bootloader with grub-install /dev/sda
  3. Recheck to ensure the that installation has completed without any errors grub-install --recheck /dev/sda
@wojteklu
wojteklu / clean_code.md
Last active May 27, 2024 13:18
Summary of 'Clean code' by Robert C. Martin

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.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules