Skip to content

Instantly share code, notes, and snippets.

View bitqiu's full-sized avatar
🏢
Working

Bit Qiu bitqiu

🏢
Working
View GitHub Profile
@bitqiu
bitqiu / 01_deployContracts.js
Created April 27, 2024 14:16 — forked from BlockmanCodes/01_deployContracts.js
Uniswap V3: Deploy contracts locally - updated may 2023
const { ContractFactory, utils } = require("ethers")
const WETH9 = require("../WETH9.json")
const fs = require('fs');
const { promisify } = require('util');
const artifacts = {
UniswapV3Factory: require("@uniswap/v3-core/artifacts/contracts/UniswapV3Factory.sol/UniswapV3Factory.json"),
SwapRouter: require("@uniswap/v3-periphery/artifacts/contracts/SwapRouter.sol/SwapRouter.json"),
NFTDescriptor: require("@uniswap/v3-periphery/artifacts/contracts/libraries/NFTDescriptor.sol/NFTDescriptor.json"),
@bitqiu
bitqiu / xposed.java
Created July 6, 2023 05:50 — forked from Forgo7ten/xposed.java
roysue分享的xposed万能代码
// 被hook的app的包名
String hookedPackageName = "com.xekvhaDYe.androie";
// app里面的Activity
String hookedActivityName = "com.xekvhaDYu.android.a.MainActivity";
if (hookedPackageName.equals(lpparam.packageName)) {
XposedBridge.log("has hooked...");
XposedBridge.log("inner => " + lpparam.processName);
Class ActivityThread = XposedHelpers.findClass("android.app.ActivityThread", lpparam.classLoader);
XposedBridge.hookAllMethods(ActivityThread, "performLaunchActivity", new XC_MethodHook() {
@Override
@bitqiu
bitqiu / 提问的智慧.md
Created August 23, 2016 02:34 — forked from zer4tul/提问的智慧.md
Simplified Chinese edition of "How To Ask Questions The Smart Way"
@bitqiu
bitqiu / gist:fe10539500766fe1db10584a0f3a1465
Created April 18, 2016 12:08 — forked from tonymtz/gist:714e73ccb79e21c4fc9c
Uninstall XQuartz.app from OSX Yosemite
launchctl unload /Library/LaunchAgents/org.macosforge.xquartz.startx.plist
sudo launchctl unload /Library/LaunchDaemons/org.macosforge.xquartz.privileged_startx.plist
sudo rm -rf /opt/X11* /Library/Launch*/org.macosforge.xquartz.* /Applications/Utilities/XQuartz.app /etc/*paths.d/*XQuartz
sudo pkgutil --forget org.macosforge.xquartz.pkg
# Log out and log in
@bitqiu
bitqiu / ApplicationPolicy.php
Created February 18, 2016 02:33 — forked from dcabanaw/ApplicationPolicy.php
ACL in Laravel: Roles and Permissions fix for booting when scheming is not created...
<?php
namespace App\Policies;
use Illuminate\Contracts\Auth\Access\Gate as GateContract;
class ApplicationPolicy
{
/**
* @var GateContract
*/
@bitqiu
bitqiu / 01_Laravel 5 Simple ACL manager_Readme.md
Created February 18, 2016 02:31 — forked from amochohan/01_Laravel 5 Simple ACL manager_Readme.md
Laravel 5 Simple ACL - Protect routes by an account / role type

#Laravel 5 Simple ACL manager

Protect your routes with user roles. Simply add a 'role_id' to the User model, install the roles table and seed if you need some example roles to get going.

If the user has a 'Root' role, then they can perform any actions.

Installation

Simply copy the files across into the appropriate directories, and register the middleware in App\Http\Kernel.php

@bitqiu
bitqiu / .env.example
Created December 23, 2015 11:11 — forked from iolson/.env.example
GitLab CI Laravel 5.1.*
DB_HOST=mysql
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
# Before Script
before_script:
- composer self-update
- composer install --prefer-dist > /dev/null
- cp .env.example .env
- php artisan key:generate
- php artisan migrate:refresh
# Services
services:
@bitqiu
bitqiu / genymotionwithplay.txt
Created October 29, 2015 02:50 — forked from wbroek/genymotionwithplay.txt
Genymotion with Google Play Services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161892865 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip)
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip)
Google Apps for Android 4.2 (https://www.androidfilehost.com/?fid=23060877490000128 - gapps-jb-20130812-signed.zip)
@bitqiu
bitqiu / Gulpfile.js
Last active August 29, 2015 14:24 — forked from JeffreyWay/Gulpfile.js
var gulp = require('gulp');
var browserify = require('browserify');
var babelify = require('babelify');
var source = require('vinyl-source-stream');
gulp.task('browserify', function() {
return browserify('./js/app.js')
.transform(babelify, { stage: 0 })
.bundle()
.on('error', function(e){