Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it!
# IMPORTANT: You will need to run this script from Recovery. In fact, macOS Catalina brings read-only filesystem which prevent this script from working from the main OS.
# This script needs to be run from the volume you wish to use.
# E.g. run it like this: cd /Volumes/Macintosh\ HD && sh /Volumes/Macintosh\ HD/Users/sabri/Desktop/disable.sh
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
@akotulu
akotulu / CMakeLists.txt
Created April 13, 2021 05:22 — forked from fracek/CMakeLists.txt
CMake and GTK+ 3
# Thanks to @danger89 and @Ilothar for updating the gist.
# Set the name and the supported language of the project
project(hello-world C CXX)
# Set the minimum version of cmake required to build this project
cmake_minimum_required(VERSION 3.10)
# Use the package PkgConfig to detect GTK+ headers/library files
find_package(PkgConfig REQUIRED)
pkg_check_modules(GTK REQUIRED gtkmm-3.0)
@akotulu
akotulu / fns_tinybrowser.php
Last active November 14, 2022 21:28
TinyMCE's tinybrowser plugin Flash replacement
<?php
// Removed deprecated functions
// sql_regcase
/* Create Folder */
function createfolder($dir, $perm)
{
// prevent hidden folder creation
$dir = ltrim($dir, '.');
@akotulu
akotulu / Camear2Preview.java
Last active March 7, 2023 00:34 — forked from siralam/Camear2Preview.java
Zoomable Camera2 with preview.
package cameraview.com.cameraview;
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.*;
import android.hardware.SensorManager;
import android.hardware.camera2.*;
import android.hardware.camera2.params.StreamConfigurationMap;
import android.media.Image;
import android.media.ImageReader;
@akotulu
akotulu / ca.md
Created June 4, 2019 10:32 — forked from soarez/ca.md
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@akotulu
akotulu / ir_nikon.py
Created May 26, 2017 16:19 — forked from xyb/ir_nikon.py
Converting IR code of Nikon remote trigger to a wave file.
#!/usr/bin/env python
import sys
from itertools import *
from wavebender import *
def half_wave(frequency=19000, framerate=44100, amplitude=0.5,
skip_frame=0):
for s in sine_wave(frequency, framerate, amplitude,
// ----- C -------
/**
* arduino Nikon IR remote
* @license Creative commons: Attribution-Noncommercial-Share Alike 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
* @author Aurelien ANTOINE
* version 1
* date 20081217
*
*
* This version modified by Steve Hoefer September 12, 2011
ACTION = build
AD_HOC_CODE_SIGNING_ALLOWED = NO
ALTERNATE_GROUP = staff
ALTERNATE_MODE = u+w,go-w,a+rX
ALTERNATE_OWNER = grantdavis
ALWAYS_SEARCH_USER_PATHS = NO
ALWAYS_USE_SEPARATE_HEADERMAPS = YES
APPLE_INTERNAL_DEVELOPER_DIR = /AppleInternal/Developer
APPLE_INTERNAL_DIR = /AppleInternal
APPLE_INTERNAL_DOCUMENTATION_DIR = /AppleInternal/Documentation