Skip to content

Instantly share code, notes, and snippets.

View CWKSC's full-sized avatar
🏫
in school

CWKSC CWKSC

🏫
in school
View GitHub Profile
public class DynamicJsonConverter : JsonConverter<dynamic>
{
public override dynamic Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
if (reader.TokenType == JsonTokenType.True)
{
return true;
}
@CWKSC
CWKSC / with.jl
Last active January 8, 2022 17:47
Kotlin with in Julia
function changeSymbol(target, to, expr)
function dfs(expr)
args = expr.args
for i in 1:length(args)
arg = args[i]
if arg isa Expr
dfs(arg)
elseif arg isa Symbol
if arg == target
args[i] = to
@mayankmkh
mayankmkh / PrettyPrint.kt
Last active October 7, 2024 21:14
Pretty Print Kotlin Data Class
fun Any.prettyPrint(): String {
var indentLevel = 0
val indentWidth = 4
fun padding() = "".padStart(indentLevel * indentWidth)
val toString = toString()
val stringBuilder = StringBuilder(toString.length)
@CWKSC
CWKSC / Direct3D_FPS.cs
Last active December 5, 2020 14:51
CTF - Reversing.Kr
int[] flag = { 0x43, 0x6B, 0x66, 0x6B, 0x62, 0x75, 0x6C, 0x69, 0x4C, 0x45, 0x5C, 0x45, 0x5F, 0x5A, 0x7E, 0x1C, 0x07, 0x25, 0x25, 0x29, 0x70, 0x17, 0x34, 0x39, 0x01, 0x16, 0x49, 0x4C, 0x20, 0x15, 0x0B, 0x0F, 0xF7, 0xEB, 0xFA, 0xE8, 0xB0, 0xFD, 0xEB, 0xBC, 0xF4, 0xCC, 0xDA, 0x9F, 0xF5, 0xF0, 0xE8, 0xCE, 0xF0, 0xA9 };
for (int i = 0; i < flag.Length; i++)
{
((char)(flag[i] ^ i * 4)).Print();
}
// CongratulationF Game Clear! Password is Thr3EDPr0m
@CWKSC
CWKSC / IsPrime_int.cs
Last active November 29, 2020 07:27
Fast Prime Test for int ,short
// Prime Test for int //
// Switch will compiled into jump table in Release mode
// Slower when run on Debug mode
// Very stupid but useful
// Try to test execution time compare to normal version
// Speed up 6 - 7 times in my machine
// For Test the range of 2147000000 to 2147483646 for 10 times
@aymericbeaumet
aymericbeaumet / delete-likes-from-twitter.md
Last active November 17, 2024 14:13
[Recipe] Delete all your likes/favorites from Twitter

Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.

  1. Go to: https://twitter.com/{username}/likes
  2. Open the console and run the following JavaScript code:
setInterval(() => {
  for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
    d.click()
 }
@rxaviers
rxaviers / gist:7360908
Last active November 17, 2024 19:33
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: