Skip to content

Instantly share code, notes, and snippets.

@quanganhdo
quanganhdo / breakpoint.png
Created November 1, 2023 13:26 — forked from mvnrc/breakpoint.png
Print current UIViewController class name on viewDidAppear in debug console in Xcode (Swift/Objective-C)
breakpoint.png
@quanganhdo
quanganhdo / gist:c7cb3a14ec50778200512e77c678067d
Last active March 21, 2024 09:00
Install Vim 8 with Python, Python 3, Ruby and Lua support on Raspberry Pi (Raspbian Stretch)
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev libncurses5-dev libatk1.0-dev libx11-dev libxpm-dev libxt-dev
#Optional: so vim can be uninstalled again via `dpkg -r vim`
sudo apt-get install checkinstall
sudo rm -rf /usr/local/share/vim /usr/bin/vim
cd ~
@quanganhdo
quanganhdo / mount-fat32
Created June 13, 2017 16:22 — forked from miguelmota/mount_fat32.sh
OS X mount FAT32 partition with read/write permissions
# diskutil list
diskutil unmount /dev/disk0s6
sudo mount -w -t msdos /dev/disk0s6 /Volumes/data
@quanganhdo
quanganhdo / finder_icons.sh
Created September 4, 2016 18:55 — forked from chockenberry/finder_icons.sh
A simple shell script to turn the Finders desktop icons on and off
#!/bin/sh
defaults read com.apple.finder CreateDesktop > /dev/null 2>&1
enabled=$?
if [ "$1" = "off" ]; then
if [ $enabled -eq 1 ]; then
defaults write com.apple.finder CreateDesktop false
osascript -e 'tell application "Finder" to quit'
open -a Finder
@quanganhdo
quanganhdo / main.m
Created March 24, 2016 10:33 — forked from steventroughtonsmith/main.m
Load Mach-O executable at runtime and execute its entry point
void callEntryPointOfImage(char *path, int argc, char **argv)
{
void *handle;
int (*binary_main)(int binary_argc, char **binary_argv);
char *error;
int err = 0;
printf("Loading %s\n", path);
handle = dlopen (path, RTLD_LAZY);
{
{I have|I've} been {surfing|browsing} online more than {three|3|2|4} hours today, yet I never found any interesting article like yours. {It's|It
is} pretty worth enough for me. {In my opinion|Personally|In my view}, if all {webmasters|site owners|website owners|web owners} and bloggers made good content as
you did, the {internet|net|web} will be {much more|a lot more}
useful than ever before.|
I {couldn't|could not} {resist|refrain from} commenting. {Very well|Perfectly|Well|Exceptionally well} written!|
{I will|I'll} {right away|immediately} {take hold of|grab|clutch|grasp|seize|snatch}
your {rss|rss feed} as I {can not|can't} {in finding|find|to find} your {email|e-mail} subscription {link|hyperlink} or {newsletter|e-newsletter} service. Do {you have|you've} any?
{Please|Kindly} {allow|permit|let} me {realize|recognize|understand|recognise|know} {so that|in order that} I {may just|may|could} subscribe.
Thanks.|
@quanganhdo
quanganhdo / brew-cask.rb
Created October 10, 2012 05:29 — forked from phinze/brew-cask.rb
a homebrew formula for installing brew-cask
require 'formula'
class BrewCask < Formula
homepage 'https://github.com/phinze/brew-cask/'
head 'git://github.com/patrickkettner/brew-cask.git'
skip_clean :all
def install
<?php
/**
* A little Object Relational Mapper in PHP
* @author dennis.hotson@gmail.com
*/
class Post
{
public $title;