Skip to content

Instantly share code, notes, and snippets.

View trungie's full-sized avatar

Trung Hoang trungie

View GitHub Profile
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@warnergodfrey
warnergodfrey / gist:7512051
Last active September 21, 2018 03:20
Access the ATO Business Portal using AusKey Mac OS X Mountain Lion
  • Install the latest JRE from Oracle
  • In the Java Control Panel, go to the Security tab and make sure 'Enable Java Content' is checked
  • Open Safari
  • Go to the ATO Business portal site https://bp.ato.gov.au/BpStatics/homepage.htm
  • Click Login
  • A dialog will apear asking you 'Do you want to trust the website “authentication.business.gov.au” to use the “Java” plug-in?'
  • Click 'Trust'
  • Now you will be asked 'Do you want to run this application?'
  • Click 'Run'
  • Another dialog will appear asking you to 'Allow access to the following application from this website?'
@stephanos
stephanos / build.gradle
Created January 27, 2014 09:48
Gradle: Automate IntelliJ IDEA project generation for a Java App Engine project
def jvmRunFlags = '''
-Xmx700m
- ...
'''.split().toList()
def jvmTestFlags = '''
-Dlocally=true
-ea
- ...
'''.split().toList()
package com.mirth.stevek.rxtest;
import rx.Observable;
import rx.functions.Action1;
import rx.functions.Func1;
import rx.functions.Func3;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.*;
@staltz
staltz / introrx.md
Last active April 20, 2024 14:15
The introduction to Reactive Programming you've been missing
@JakeWharton
JakeWharton / AutoGson.java
Last active November 28, 2021 12:32
A Gson TypeAdapterFactory which allows serialization of @autovalue types. Apache 2 licensed.
import com.google.auto.value.AutoValue;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* Marks an {@link AutoValue @AutoValue}-annotated type for proper Gson serialization.
* <p>
import android.content.Context;
import android.content.SharedPreferences;
import android.text.TextUtils;
import android.util.Log;
import java.io.*;
import java.net.CookieStore;
import java.net.HttpCookie;
import java.net.URI;
import java.net.URISyntaxException;
@staringispolite
staringispolite / asciiputsonglasses
Last active March 22, 2024 06:39
Ascii art sunglasses meme
Puts on glasses:
(•_•)
( •_•)>⌐■-■
(⌐■_■)
Takes off glasses ("mother of god..."):
(⌐■_■)
( •_•)>⌐■-■
@topheman
topheman / jspm.travis.setup.md
Created August 4, 2015 18:49
Travis setup of Github token for jspm
@jorihardman
jorihardman / sumo_logic.config
Last active April 27, 2023 18:43
Elastic Beanstalk Sumo Logic Config
# This will automatically install the Sumo Logic collector on AWS Elastic
# Beanstalk instances. Add this to the .ebextensions folder in your app root
# and edit L24-25 to match your Sumo Logic accessid and accesskey. To add or
# remove tracked files, simply add or remove source hashes to the sources
# array on L36.
packages:
rpm:
SumoCollector: https://collectors.sumologic.com/rest/download/rpm/64
services: