Skip to content

Instantly share code, notes, and snippets.

View junyuecao's full-sized avatar

JunyueCao junyuecao

View GitHub Profile
@junyuecao
junyuecao / Add a name section to a stripped released wasm file with symbols file
Last active August 1, 2023 04:32
Add a name section to a stripped released wasm file with symbols file
Usage :
python3 wasm-addname.py input.wasm -s input.js.symbols -o input.name.wasm -f
@junyuecao
junyuecao / script.sh
Created August 14, 2018 09:24
Vivo 自动安装
#/bin/bash
while true; do
current_page=`adb shell dumpsys activity top | sed -n '2p'`
pass_input=`echo $current_page | grep AccountVerifyActivity`
continue_install=`echo $current_page | grep PackageInstallerActivity`
confirm_install=`echo $current_page | grep PackageInstallerActivityOther`
if [ 'x'"$pass_input" != 'x' ];then
adb shell input text 'aaaa1111'
/***
Copyright (c) 2013 CommonsWare, LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may
not use this file except in compliance with the License. You may obtain
a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Number Name Score Regex Length All match? Credit
 1 | Plain Strings| 207 | `foo`                                              | 3      | Yes        | 
 2 | Anchors      | 208 | `k$`                                               | 2      | Yes        |
 3 | Ranges       | 202 | `^[a-f]*$`                                         | 8      | Yes        |
 4 | Backrefs     | 201 | `(...).*\1`                                        | 9      | Yes        | gorhill (HN)
 5 | Abba         | 193 | `^(?!.*(.)(.)\2\1)`                                | 17     | Yes        | chingjun (HN) / josephlord (HN) 
 6 | A man, a plan| 177 | `^(.)[^p].*\1$`                                    | 13     | Yes        | hyp0 (HN)

7 | Prime | 286 | ^(?!(..+)\1+$) | 14 | Yes | josephlo

// Bouncing a user back to their last place after authentication with Express 3
// To accompany http://stackoverflow.com/a/12443844/1380669
// by therealplato
var express = require('express');
var app = express();
require('http').createServer(app).listen(3000
, function(err){
console.log(err || "Listening on 3000");
});
controllers.controller('MainCtrl', function($scope, $location, Facebook, $rootScope, $http, $location, Upload, Auth, User, Question, Category, Serie, Record, Location, Popup, Process, Card, Question) {
$scope.$on('authLoaded', function() {
$scope.isExpert($scope.main.serieId);
$scope.isMember($scope.main.serieId);
});
$scope.loadAuth = function() {
Auth.load().success(function(data) {
$scope.main.user = data.user;
$scope.$broadcast("authLoaded");