Skip to content

Instantly share code, notes, and snippets.

View QuanTrieuPCYT's full-sized avatar
:shipit:
hi

QuanTrieuPCYT QuanTrieuPCYT

:shipit:
hi
View GitHub Profile
@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active July 24, 2024 22:57
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
@guizmo
guizmo / upload_file.sh
Created August 16, 2012 20:56
Upload file via ssh
scp someFile someUser@someServer:/somePath/someFile
@benjaminblack
benjaminblack / booting-debian-linux-directly-from-the-uefi-boot-manager.md
Last active May 5, 2024 13:33
Booting (Debian) Linux directly from the UEFI boot manager

With a modern UEFI motherboard, it is possible to boot Linux directly from the UEFI boot manager, without relying on a boot loader like GRUB.

First, the kernel has to be compiled with the "EFI boot stub" option enabled, which modifies the kernel so that it can be directly executed by the UEFI boot manager.

Debian enables this flag: grep CONFIG_EFI_STUB /boot/config-*

Second, the EFI System Partition (ESP) must be large enough to hold the kernel and the initrd image. The UEFI boot manager executable files must be on the ESP; therefore, the kernel and initrd must be on the ESP, since the kernel is the EFI executable, and the kernel requires the initrd to be somewhere it can find it.

The ESP in Debian is usually 100-250 MB, which is fine.

@k3kdude
k3kdude / DiscordWebhook.java
Created August 17, 2017 15:31
Java DiscordWebhook class to easily execute Discord Webhooks
import javax.net.ssl.HttpsURLConnection;
import java.awt.Color;
import java.io.IOException;
import java.io.OutputStream;
import java.lang.reflect.Array;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@matthewzring
matthewzring / markdown-text-101.md
Last active July 24, 2024 06:37
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

What this guide covers:

@jornane
jornane / GROW.md
Created October 23, 2017 12:12
How to grow a partition in Linux

How to grow a partition in Linux

This guide will walk you through the steps required to grow a partition in Linux. You will have to reboot through this guide.

  1. If possible, make a snapshot.

Often, you will want to grow the partition table because you made your virtual hard disk too small, and you tried to extend it in your hypervisor, only to find out that your partition is still the same size as it was before.

@MPThLee
MPThLee / enableDiscordExperiments.js
Last active June 20, 2024 12:30
This code doesn't work anymore. I just decided to remove this code. You can check working code on comments.
/**
* !!!! This code doesn't work anymore !!!!
*
* - You can check working code on comments. I won't update this code anymore.
*
* Also, I just decided to remove this code. You can check revisions for old code.
* Since this code was made for discord client that almost 5 years ago, It seems like doesn't work anymore.
* I don't want people keep arguing in the comments, i decided to remove this code.
*
* Note: This code is now fulfilled with Javascript comments. This code won't work even if you pasted to console. doesn't do anything.
@Omar-Ikram
Omar-Ikram / EndpointSecurityDemo.m
Last active July 12, 2024 08:01
A demo of using Apple's EndpointSecurity framework - tested on macOS Monterey 12.2.1 (21D62)
//
// main.m
// EndpointSecurityDemo
//
// Created by Omar Ikram on 17/06/2019 - macOS Catalina 10.15 Beta 1 (19A471t)
// Updated by Omar Ikram on 15/08/2019 - macOS Catalina 10.15 Beta 5 (19A526h)
// Updated by Omar Ikram on 01/12/2019 - macOS Catalina 10.15 (19A583)
// Updated by Omar Ikram on 31/01/2021 - macOS Big Sur 11.1 (20C69)
// Updated by Omar Ikram on 07/05/2021 - macOS Big Sur 11.3.1 (20E241)
// Updated by Omar Ikram on 04/07/2021 - macOS Monterey 12 Beta 2 (21A5268h)
List<double> result = GetErrorStatisticsArray(score.HitErrors);
hint = String.Format("Accuracy:\nError: {0:0.00}ms - {1:0.00}ms avg\nUnstable Rate: {2:0.00}\n", result[0], result[1], result[4] * 10, result[6], result[5]);
// input is a list of (user_hit_time - correct_time)
internal List<double> GetErrorStatisticsArray(List<int> list)
{
if (list == null || list.Count == 0)
return null;
List<double> result = new List<double>(4);
@theothernt
theothernt / apple-tv-screen-saver-feeds.txt
Last active July 24, 2024 19:36
A list of the feeds Apple uses for its video screensavers
tvOS 10: 1080p + H.264
http://a1.phobos.apple.com/us/r1000/000/Features/atv/AutumnResources/videos/entries.json
tvOS 11: 1080p/4K + SDR/HDR + HEVC
https://sylvan.apple.com/Aerials/2x/entries.json
https://t27q97zg19.execute-api.us-east-1.amazonaws.com/prod/aerialAltJSON/4kEntites.json
tvOS 12: 4K + SDR/HDR + HEVC, 1080p + H.264, localised descriptions
https://sylvan.apple.com/Aerials/resources.tar