Skip to content

Instantly share code, notes, and snippets.

@marioacarvalho
marioacarvalho / Electronic-Non-Vocal.xml
Created April 13, 2022 16:14 — forked from jamie-tillman/Electronic-Non-Vocal.xml
A pseudo-playlist of non-vocal electronic music tracks and artists I've collected over the years
<Playlist>
<Entry>
<Artist>Spice Barons</Artist>
<Album>Future Perfect State</Album>
<Track>Future Perfect State</Track>
</Entry>
<Entry>
<Artist>Spice Barons</Artist>
<Album>Future Perfect State</Album>
<Track>Bioluminous</Track>
@marioacarvalho
marioacarvalho / AutoResizeTextView.java
Last active August 31, 2017 23:50
Auto Font Resize Android TextView - from http://stackoverflow.com/a/17786051
package x;
/**
* Created by M-WaJeEh http://stackoverflow.com/a/17786051
*/
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.RectF;
@marioacarvalho
marioacarvalho / FCPrivateBatteryStatus.m
Created March 15, 2016 12:34
How to get raw battery info (mAh remaining, etc.) from iOS using private APIs. For internal testing only, NOT APP STORE DISTRIBUTION!
#import <Foundation/Foundation.h>
#include <dlfcn.h>
NSDictionary *FCPrivateBatteryStatus()
{
static mach_port_t *s_kIOMasterPortDefault;
static kern_return_t (*s_IORegistryEntryCreateCFProperties)(mach_port_t entry, CFMutableDictionaryRef *properties, CFAllocatorRef allocator, UInt32 options);
static mach_port_t (*s_IOServiceGetMatchingService)(mach_port_t masterPort, CFDictionaryRef matching CF_RELEASES_ARGUMENT);
static CFMutableDictionaryRef (*s_IOServiceMatching)(const char *name);
@marioacarvalho
marioacarvalho / laptop.local
Last active November 2, 2015 15:26
Bundle install software OS X
#!/bin/sh
export HOMEBREW_CASK_OPTS="--appdir=/Applications"
brew_tap 'caskroom/cask'
brew_install_or_upgrade 'brew-cask'
echo Install all AppStore Apps at first!
brew cask install dropbox
@marioacarvalho
marioacarvalho / osx_install.sh
Created November 2, 2015 12:01 — forked from t-io/osx_install.sh
Install most of my Apps with homebrew & cask
#!/bin/sh
echo Install all AppStore Apps at first!
# no solution to automate AppStore installs
read -p "Press any key to continue... " -n1 -s
echo '\n'
echo Install and Set San Francisco as System Font
ruby -e "$(curl -fsSL https://raw.github.com/wellsriley/YosemiteSanFranciscoFont/master/install)"
echo Install Homebrew, Postgres, wget and cask
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"