Skip to content

Instantly share code, notes, and snippets.

@edwardtoday
edwardtoday / sms2wechatwork.js
Created March 13, 2020 09:10
tasker转发短信到企业微信机器人
// 需要调整到变量
var webhook = "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=baffda1c-c922-409e-91ef-***********"
//定义post方法
function posthttp(url, data) {
var xhr = new XMLHttpRequest();
xhr.addEventListener("readystatechange", function () {
if (this.readyState === 4) {
flash(this.responseText); //显示返回消息,可删除本行
}
@riyaz
riyaz / installFromAAB.sh
Last active January 14, 2023 19:36 — forked from keyboardsurfer/installFromBundle
Install the app in device from aab
#!/bin/sh
# One step wrapper to install aab to connected device, it downloads bundletool if its missing and signs the app with android debug certifiate.
#
# Usage: installFromAAB install-aab <local-aab-path>
BASENAME="${1##*/}"
KEYSTORE=~/.android/debug.keystore
KS_ALIAS="androiddebugkey"
PASS="pass:android"
@junlas
junlas / DomAudioGroup.js
Last active March 2, 2018 05:23
Dom Audio 以及 Web Audio 在微信网页上的播放管理工具类(自动播放,不需要点击播放)
import WeixinAudio from "../weixin/WeixinAudio";
import WeixinUtils from "../weixin/WeixinUtils";
export default class DomAudioGroup {
_audioUrl = null;
_endCallback = null;
_domAudio = null;
@liortal53
liortal53 / DecoratorEditor.cs
Last active May 10, 2024 14:28
Extend Unity's built-in inspectors
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using UnityEditor;
using UnityEngine;
/// <summary>
/// A base class for creating editors that decorate Unity's built-in editor types.
/// </summary>
public abstract class DecoratorEditor : Editor
@benvium
benvium / apk-change-version-number.md
Created February 20, 2015 16:14
How to change the version number on an existing APK without re-building

This requires the latest version of apktool.

apktool d $APK_PATH -o $OUTPUT_FOLDER

# Open the apktool.yml text file
# Alter the versionCode and versionName entries

# now rebuild!
apktool build $OUTPUT_FOLDER 
@subfuzion
subfuzion / global-gitignore.md
Last active May 5, 2024 19:34
Global gitignore

There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules directory) as well as files that are generated (and regenerated) as artifacts of a build process.

All other files should be in your own global gitignore file:

  • Create a file called .gitignore in your home directory and add any filepath patterns you want to ignore.
  • Tell git where your global gitignore file is.

Note: The specific name and path you choose aren't important as long as you configure git to find it, as shown below. You could substitute .config/git/ignore for .gitignore in your home directory, if you prefer.

@codecaffeine
codecaffeine / randimg.rb
Last active February 21, 2024 22:22
Random Image Generator (imagemagick + ruby)
#!/usr/bin/env ruby
# Script to generate random images. Based on http://www.imagemagick.org/Usage/canvas/#random_blur
require 'optparse'
options = {}
optparse = OptionParser.new do |opts|
ACTION
AD_HOC_CODE_SIGNING_ALLOWED
ALTERNATE_GROUP
ALTERNATE_MODE
ALTERNATE_OWNER
ALWAYS_SEARCH_USER_PATHS
ALWAYS_USE_SEPARATE_HEADERMAPS
APPLE_INTERNAL_DEVELOPER_DIR
APPLE_INTERNAL_DIR
APPLE_INTERNAL_DOCUMENTATION_DIR
Error in user YAML: (<unknown>): found character that cannot start any token while scanning for the next token at line 2 column 1
---
# Python 简介
@su27 and @menghan
---

What is Python?

Python: 优雅而健壮的编程语言

  • 高级

  • 易学易读易维护

@phette23
phette23 / current-dir-in-iterm-tab-title.sh
Last active January 4, 2024 10:20
Set the iTerm tab title to the current directory, not full path.
# put this in your .bash_profile
if [ $ITERM_SESSION_ID ]; then
export PROMPT_COMMAND='echo -ne "\033];${PWD##*/}\007"; ':"$PROMPT_COMMAND";
fi
# Piece-by-Piece Explanation:
# the if condition makes sure we only screw with $PROMPT_COMMAND if we're in an iTerm environment
# iTerm happens to give each session a unique $ITERM_SESSION_ID we can use, $ITERM_PROFILE is an option too
# the $PROMPT_COMMAND environment variable is executed every time a command is run
# see: ss64.com/bash/syntax-prompt.html