Skip to content

Instantly share code, notes, and snippets.

View govi218's full-sized avatar
👾

Govind Mohan govi218

👾
View GitHub Profile
@DavidBuchanan314
DavidBuchanan314 / widevine_fixup.py
Last active July 9, 2024 05:13
Patch aarch64 widevine blobs from ChromeOS to work on non-ChromeOS linux, including platforms with 16K page size like Apple Silicon / Asahi Linux
"""
MIT License
Copyright (c) 2023 David Buchanan
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@moyix
moyix / killbutmakeitlooklikeanaccident.sh
Created February 5, 2022 22:51
Script to inject an exit(0) syscall into a running process. NB: only x86_64 for now!
#!/bin/bash
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont'
@b-cancel
b-cancel / sliverPersistentHeaderDelegate.dart
Created September 16, 2019 03:41
SliverPersistentHeaderDelegate Example
/*
SliverPersistentHeader(
pinned: true,
floating: true,
delegate: OurDelegate(
toolBarHeight: MediaQuery.of(context).padding.top,
openHeight: 250,
closedHeight: 40,
),
),
@josephcsible
josephcsible / unmap_all_syscalls.c
Last active July 17, 2022 16:39
Make it impossible for strace to force a syscall
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/syscall.h>
@xameeramir
xameeramir / default nginx configuration file
Last active July 12, 2024 07:24
The default nginx configuration file inside /etc/nginx/sites-available/default
# Author: Zameer Ansari
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
@djego
djego / rsa.py
Created September 30, 2017 23:20
A simple RSA implementation in Python
'''
620031587
Net-Centric Computing Assignment
Part A - RSA Encryption
'''
import random
'''
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active July 24, 2024 08:58
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@wojteklu
wojteklu / clean_code.md
Last active July 24, 2024 04: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

@tonyg
tonyg / MediaPlayer2-cmd
Created June 27, 2016 18:01
Use DBus to control whichever DBus-compatible media player happens to be running.
#!/bin/bash
if [ -z "$1" ]
then
echo "Usage: MediaPlayer2-cmd { PlayPause | Next | Previous | Stop | ... }"
exit 1
fi
tried_starting_something=false
@gubatron
gubatron / compiling_building_c_cpp_notes.md
Last active April 18, 2024 07:58
Things to remember when compiling and linking C/C++ programs

Things to remember when compiling/linking C/C++ software

by Angel Leon. March 17, 2015;

Last update on December 14, 2023

Updated on February 27, 2023

Updated August 29, 2019.