Skip to content

Instantly share code, notes, and snippets.

View zhangzhibin's full-sized avatar

Zhang Zhibin zhangzhibin

View GitHub Profile
@zhangzhibin
zhangzhibin / IronsourceHelper.ts
Last active July 27, 2021 02:06
laya + ironsource android sdk helper, contact me at https://xmanyou.com
module SdkHelper{
export class IronSourceHelper{
public static ironsource:Laya.IPlatformClass;
public static init(){
if(!this.ironsource){
this.ironsource = Laya.PlatformClass.createClass("sdkhelper.IronSourceHelper");
}
let js1 = `window["IronSourceHelper"].onInterstitialReadyChange(%s)`;
@zhangzhibin
zhangzhibin / getAdvertisingId.java
Last active May 20, 2021 10:32
query device adid for Facebook Ads Testing. contact me at https://xmanyou.com
// https://xmanyou.com
// in app gradle file
android {
// ...
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
@zhangzhibin
zhangzhibin / TAHelper.java
Last active May 20, 2021 10:32
Helper for TA Android SDK, 数数科技TA 安卓SDK 调用封装。 contact me at https://xmanyou.com
package sdkhelper;
import android.content.Context;
import android.util.Log;
import com.adjust.sdk.Adjust;
import org.json.JSONObject;
import java.util.ArrayList;
@zhangzhibin
zhangzhibin / FileBox.ts
Last active August 31, 2023 10:38
Using Open File Dialog in Cocos Creator project 详细步骤参考 https://xmanyou.com/cocos-creator-open-file-box/
// 影子工作室为你提供详细步骤 https://xmanyou.com/cocos-creator-open-file-box/
const {ccclass, property} = cc._decorator;
@ccclass
export default class FileBox extends cc.Component {
// LIFE-CYCLE CALLBACKS:
@property
containerId = "_filebox_container_";
@property
@jrenggli
jrenggli / homebrew-permissions.sh
Last active April 3, 2022 23:32
Fix homebrew permissions
sudo chown -R $(whoami) /usr/local/Cellar
sudo chown -R $(whoami) /usr/local/Homebrew
sudo chown -R $(whoami) /usr/local/var/homebrew
sudo chown -R $(whoami) ${HOME}/Library/Caches/Homebrew
sudo chown -R $(whoami) ${HOME}/Library/Logs/Homebrew
sudo chown -R $(whoami) /usr/local/etc
sudo chown -R $(whoami) /usr/local/opt
sudo chown -R $(whoami) /usr/local/bin
sudo chown -R $(whoami) /usr/local/var
sudo chown -R $(whoami) /usr/local/share/man/man1
@EvgenyOrekhov
EvgenyOrekhov / A simple Docker and Docker Compose install script for Ubuntu.md
Last active May 5, 2024 20:06
A simple Docker and Docker Compose install script for Ubuntu

A simple Docker and Docker Compose install script for Ubuntu

Usage

  1. sh install-docker.sh
  2. log out
  3. log back in

Links

@magnetikonline
magnetikonline / Dockerfile
Last active August 14, 2023 19:23
Dockerfile Ubuntu apt-get AU mirror switching.
FROM ubuntu:18.04
LABEL maintainer="Peter Mescalchin <peter@magnetikonline.com>"
RUN sed --in-place --regexp-extended "s/(\/\/)(archive\.ubuntu)/\1au.\2/" /etc/apt/sources.list && \
apt-get update && apt-get upgrade --yes
@irazasyed
irazasyed / homebrew-permissions-issue.md
Last active May 8, 2024 19:50
Homebrew: Permissions Denied Issue Fix (OS X / macOS)

Homebrew Permissions Denied Issues Solution

sudo chown -R $(whoami) $(brew --prefix)/*