Skip to content

Instantly share code, notes, and snippets.

View Bakumon's full-sized avatar
🏠
Working from home

食梦兽 Bakumon

🏠
Working from home
View GitHub Profile
#!/bin/bash
<< ////
The script creates 'licenses' under '$ANDROID_HOME' and creates a file which proves
that the SDK license was accepted by the user.
Please copy this to your own account/gist/server. Every time there's an updated license, update the file with the new
license hash.
Legally if you run this script (or your own version of it), it means YOU accepted the license - don't trust someone else.
The hashes below are supposed to be taken from $ANDROID_HOME/licenses/android-sdk-license on YOUR machine, after you
@mika76
mika76 / lua.json
Last active March 14, 2020 09:39
Corona SDK snippets for VS Code
{
"audio.dispose": {
"body": "audio.dispose( ${1:audioHandle} )",
"description": "Releases audio memory associated with the handle.",
"prefix": "audio.dispose"
},
"audio.fade": {
"body": "audio.fade( ${1:[ { [channel=c] [, time=t] [, volume=v ] } ]} )",
"description": "This fades a playing sound in a specified amount to a specified volume. The audio will continue playing after the fade completes.",
"prefix": "audio.fade"
@ifels
ifels / centos6.5_nginx
Last active September 7, 2023 01:57
centos 6.5 nginx安装与配置
第一步,在/etc/yum.repos.d/目录下创建一个源配置文件nginx.repo:
cd /etc/yum.repos.d/
vim nginx.repo
填写如下内容:
[nginx]
name=nginx repo
@steveliles
steveliles / Foreground.java
Last active January 22, 2024 18:06
Class for detecting and eventing whether an Android app is currently foreground or background (requires API level 14+)
package com.sjl.util;
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import java.util.List;
@Antarix
Antarix / progress.xml
Last active October 19, 2020 20:26
Android ProgressBar indeterminateDrawable
<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="0"
android:pivotX="50%"
android:pivotY="50%"
android:duration="1" <!-- Duration = 1 means that the rotation will be done in 1 second-->
android:toDegrees="360" <!--increase duration if you want to speed up the rotation-->
>
<shape