Skip to content

Instantly share code, notes, and snippets.

View ardianta's full-sized avatar
👋
hi!

Ahmad Muhardian ardianta

👋
hi!
View GitHub Profile
@juanbrujo
juanbrujo / PlayStationBIOSFilesNAEUJP.md
Last active May 4, 2024 17:54
Files for PlayStation BIOS Files NA-EU-JP
@vasanthk
vasanthk / System Design.md
Last active May 4, 2024 16:39
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@mertyildiran
mertyildiran / alphademo-png.c
Created July 2, 2017 14:29
Transparent window with GTK and display a PNG image
#include <gtk/gtk.h>
#include <gdk/gdkscreen.h>
#include <cairo.h>
/*
* This program shows you how to create semi-transparent windows,
* without any of the historical screenshot hacks. It requires
* a modern system, with a compositing manager. I use xcompmgr
* and the nvidia drivers with RenderAccel, and it works well.
*
@bgromov
bgromov / git-reset-author.sh
Created June 23, 2016 17:50
Git: reset author for ALL commits
#!/bin/sh
# Credits: http://stackoverflow.com/a/750191
git filter-branch -f --env-filter "
GIT_AUTHOR_NAME='Newname'
GIT_AUTHOR_EMAIL='new@email'
GIT_COMMITTER_NAME='Newname'
GIT_COMMITTER_EMAIL='new@email'
" HEAD
@barbietunnie
barbietunnie / udemy-courses-download-using-cookies.md
Last active April 7, 2024 22:24
Downloading Udemy videos with youtube-dl

How to download your Udemy course videos using youtube-dl

$ youtube-dl --list-extractors | grep udemy

Steps

  1. Get link to the course to download. e.g. https://www.udemy.com/course-name/
  2. Login into udemy website, save the cookie from chrome using Chrome (Cookie.txt)[1] export extension. Save it to file udemy-cookies.txt
  3. Get the link of the video that you want to download. usually in format. Use the command provided below where you have to replace the {course_link} and {path_to_cookies_file} with respective paths.
$ youtube-dl {course_link} --cookies {path_to_cookies_file}
@Biswa96
Biswa96 / Remove_MIUI_Bloatware.CMD
Last active April 7, 2024 15:38
Remove bloatware applications from MIUI ROM in Xiaomi phones
@echo off
set /p Y=Enter adb.exe folder path:
cd /d %Y%
adb devices
pause
for %%X in (
"com.amazon.appmanager"
"com.android.browser"
"com.android.chrome"
"com.android.email"
@ardianta
ardianta / json-ld-blogger.xml
Last active April 4, 2024 14:09
Valid JSON-LD for Blogger
<script type="application/ld+json">
{ "@context": "http://schema.org",
"@type": "BlogPosting",
"headline": "<data:post.title/>",
"alternativeHeadline": "<data:post.title/>",
"mainEntityOfPage" : "<data:blog.homepageUrl/>",
"image": {
"@type" : "imageObject",
"url" : "<data:post.firstImageUrl/>",
"height": "480",
@kra3
kra3 / eq.preset
Created March 26, 2014 12:11
Audacious presets: ~/.config/audacious/eq.preset
[Presets]
Preset0=Classical
Preset1=Club
Preset2=Dance
Preset3=Flat
Preset4=Live
Preset5=Laptop Speakers/Headphone
Preset6=Rock
Preset7=Pop
@callumacrae
callumacrae / build-tools.md
Last active October 25, 2023 15:14
Build tools written in JavaScript
@gasman
gasman / encode.py
Created October 25, 2020 12:23
Encoding a file as a Youtube video - https://www.youtube.com/watch?v=hyqLv2_zBdA
# Encode inputfile.tar.gz as a series of video frames
# Frames are written to frames/frameNNNN.png
from PIL import Image
with open('inputfile.tar.gz', 'rb') as f:
data = f.read()
WIDTH = 120
HEIGHT = 90
CHUNK_SIZE = int((WIDTH * HEIGHT) / 8)