Skip to content

Instantly share code, notes, and snippets.

@P1N2O
P1N2O / README.md
Last active April 29, 2024 01:29
Guide to Compile an Android Kernel with Clang

Android Kernel Compilation Guide

This gist is intended to assist beginners, like myself, in getting started with Android Kernel Compilation. Please note that while I'm sharing my setup and process, this guide may not be entirely accurate, and I welcome suggestions from experienced developers to improve it.

Installing Build Tools

I am on Arch, so I will be using pacman to install the base-devel package group.

sudo pacman -S base-devel

On a Debian based distro, you can use apt and install the build-essential package.

@ChuckMichael
ChuckMichael / vcredistr.md
Last active May 1, 2024 14:17
Visual C++ Redistributable Packages
@zhutaorun
zhutaorun / FindProjectReferences.cs
Created December 26, 2016 03:09 — forked from jringrose/FindProjectReferences.cs
Unity editor extension that uses spotlight on OSX for lightning fast project reference searches. Asset serialization mode should be set to "Force Text" in the editor settings.
using UnityEngine;
using System.Collections;
using UnityEditor;
using System.Collections.Generic;
public class FindProject {
#if UNITY_EDITOR_OSX
[MenuItem("Assets/Find References In Project", false, 2000)]
@jringrose
jringrose / FindProjectReferences.cs
Last active June 17, 2022 21:34
Unity editor extension that uses spotlight on OSX for lightning fast project reference searches. Asset serialization mode should be set to "Force Text" in the editor settings.
/*
MIT License
Copyright (c) 2016 Jesse Ringrose
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
@kevinzhow
kevinzhow / vpnserver.sh
Last active March 19, 2019 12:59
OnClickVPNServer
#!/usr/bin/env bash
echo 'deb http://shadowsocks.org/debian wheezy main' >> /etc/apt/sources.list
# Pre-requisites
sudo apt-get -y update
sudo apt-get -y install pptpd
sudo apt-get -y install fail2ban
sudo apt-get -y install shadowsocks-libev
@ryanchang
ryanchang / lldb_cheat_sheet.md
Last active May 2, 2024 11:24
LLDB Cheat Sheet

LLDB Cheat Sheet

A complete gdb to lldb command map.

Print out

  • Print object
(lldb) po responseObject
(lldb) po [responseObject objectForKey@"state"]
  • p - Print primitive type
So you'd like to manage your iOS devices by command line?
You can use libimobiledevice tools for that.
Easy on Linux. Let's see how it is on Mac OS X.
You'll need to:
1. install Xcode
2. start Xcode and agree to it's license
3. install Xcode command line tools (Start Xcode, Go to Preferences -> Downloads tab)
4. install homebrew by this command (sudo password will be prompted)
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
@karl-
karl- / CleanUpWindow.cs
Created November 15, 2012 03:25
New interface for removing unused Unity assets
using UnityEngine;
using UnityEditor;
using System.IO;
using System.Collections;
using System.Collections.Generic;
public class CleanUpWindow : EditorWindow
{
bool groupEnabled = true;
List<string> usedAssets = new List<string>();
# Makefile template for a shared library in C
# https://www.topbug.net/blog/2019/10/28/makefile-template-for-a-shared-library-in-c-with-explanations/
CC = gcc # C compiler
CFLAGS = -fPIC -Wall -Wextra -O2 -g # C flags
LDFLAGS = -shared # linking flags
RM = rm -f # rm command
TARGET_LIB = libtarget.so # target lib
SRCS = main.c src1.c src2.c # source files