Skip to content

Instantly share code, notes, and snippets.

View fishkingsin's full-sized avatar
✈️

James Kong fishkingsin

✈️
View GitHub Profile
@hurricane-voronin
hurricane-voronin / README.md
Last active May 9, 2024 03:41
Naming Classes Without a 'Manager'
@ChanSek
ChanSek / proguard-rules.pro
Last active December 14, 2017 05:42
ProGuard Rules for Google Play Services
-keep class com.google.protobuf.zzc
-keep class com.google.protobuf.zzd
-keep class com.google.protobuf.zze
-keep class com.google.android.gms.dynamic.IObjectWrapper
-keep class com.google.android.gms.internal.zzuq
-keep class com.google.android.gms.internal.oo
-keep class com.google.android.gms.internal.oh
-keep class com.google.android.gms.internal.zzcgl
-keep class com.google.android.gms.internal.ql
@ahmadawais
ahmadawais / upload-a-file.MD
Created June 18, 2017 11:07 — forked from websupporter/upload-a-file.MD
Upload a file using the WordPress REST API

Upload files

Using the REST API to upload a file to WordPress is quite simple. All you need is to send the file in a POST-Request to the wp/v2/media route.

There are two ways of sending a file. The first method simply sends the file in the body of the request. The following PHP script shows the basic principle:

@Geri-Borbas
Geri-Borbas / BuildPostProcessor.cs
Last active March 22, 2020 17:12
Adds iOS Frameworks to Xcode project (on each Unity build).
//
// Copyright (c) 2017 eppz! mobile, Gergely Borbás (SP)
// http://www.twitter.com/_eppz
//
// 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 furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, AR
@andreibosco
andreibosco / creative-cloud-disable.md
Last active January 3, 2024 02:37
disable creative cloud startup on mac
@superjamie
superjamie / raspberry-pi-vpn-router.md
Last active April 13, 2024 12:22
Raspberry Pi VPN Router

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

@chrismdp
chrismdp / s3.sh
Last active March 5, 2024 12:57
Uploading to S3 in 18 lines of Shell (used to upload builds for http://soltrader.net)
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine
# This is how I upload my new Sol Trader builds (http://soltrader.net)
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash
S3KEY="my aws key"
S3SECRET="my aws secret" # pass these in
function putS3
{
path=$1
@taka-wang
taka-wang / example.py
Last active April 14, 2016 14:42
install mosquitto 1.4 on raspberry pi
import paho.mqtt.client as mqtt
# The callback for when the client receives a CONNACK response from the server.
def on_connect(client, userdata, rc):
print("Connected with result code "+str(rc))
# Subscribing in on_connect() means that if we lose the connection and
# reconnect then subscriptions will be renewed.
client.subscribe("hello/world")
# The callback for when a PUBLISH message is received from the server.
@kwangbae
kwangbae / Tidy_PHAsset
Last active October 16, 2017 07:57
Getting all photos except iCloud sharing photos using PHAsset class.
PHFetchResult* assets = [PHAsset fetchAssetsWithOptions:self.defaultOptions];
[assets enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
[list addObject:obj];
}];
PHFetchResult* collections = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeAlbum subtype:PHAssetCollectionSubtypeAlbumCloudShared options:nil];
[collections enumerateObjectsUsingBlock:^(PHAssetCollection* collection, NSUInteger idx, BOOL *stop) {
PHFetchResult* assets2 = [PHAsset fetchAssetsInAssetCollection:collection options:options];
[assets2 enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
@cdsap
cdsap / AndroidManifest.xml
Last active January 7, 2021 17:59
Example ManifestPlaceHolder
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.myapplication" >
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity