Skip to content

Instantly share code, notes, and snippets.

@wahello
wahello / App.js
Created April 5, 2018 04:29 — forked from madcoda/App.js
React-router v4 multi layout
import React, { Component } from 'react'
import { BrowserRouter as Router, Route, Link, Match, Redirect, Switch } from 'react-router-dom'
import OverviewPage from './page/OverviewPage'
import AccountPage from './page/AccountPage'
/*
Layouts, inline define here for demo purpose
you may want to define in another file instead
*/
@wahello
wahello / mongo-dump-csv.sh
Created June 15, 2018 02:46 — forked from mderazon/mongo-dump-csv.sh
Export all of Mongodb collections as csv without the need to specify fields
OIFS=$IFS;
IFS=",";
# fill in your details here
dbname=DBNAME
user=USERNAME
pass=PASSWORD
host=HOSTNAME:PORT
# first get all collections in the database
@wahello
wahello / related.py
Created December 6, 2018 12:34 — forked from gcko/related.py
Django Custom Model ForeignKey Field for Spanning Databases
@wahello
wahello / trial.key
Created April 10, 2019 02:15 — forked from huqi/trial.key
Beyond Compare 4 license for Mac
Beyond Compare 4
Licensed to: ASIO Allsoftinone
Quantity: 1 user
Serial number: 1822-9597
License type: Pro Edition for Windows
--- BEGIN LICENSE KEY ---
H1bJTd2SauPv5Garuaq0Ig43uqq5NJOEw94wxdZTpU-pFB9GmyPk677gJ
vC1Ro6sbAvKR4pVwtxdCfuoZDb6hJ5bVQKqlfihJfSYZt-xVrVU27+0Ja
hFbqTmYskatMTgPyjvv99CF2Te8ec+Ys2SPxyZAF0YwOCNOWmsyqN5y9t
@wahello
wahello / For Mac 4.2.6 unlimited trial.md
Created April 10, 2019 02:15 — forked from rise-worlds/For Mac 4.2.6 unlimited trial.md
Beyond Compare 4 license for Windows, Mac, Linux

for 4.2.4 or higher,4.2.5,4.2.6 ,it's works , this is the way which makes Always in evaluation mode 。

  1. go to the dir : /Applications/Beyond Compare.app/Contents/MacOS
  2. change the name BCompare to BCompare.bak
  3. touch a file name BCompare , and chmod a+u BCompare
  4. insert BCompare the content :
#!/bin/bash
rm "/Users/$(whoami)/Library/Application Support/Beyond Compare/registry.dat"
"`dirname "$0"`"/BCompare.bak $@
@wahello
wahello / test-violentmonkey.user.js
Created May 26, 2020 09:30 — forked from gera2ld/test-violentmonkey.user.js
Test Violentmonkey functions
// ==UserScript==
// @name test script
// @namespace Violentmonkey Scripts
// @icon https://cn.gravatar.com/avatar/a0ad718d86d21262ccd6ff271ece08a3?s=80
// @resource baidu https://www.baidu.com/img/baidu_jgylogo3.gif
// @resource text data:text/plain,hello,world
// @resource mochaCss https://cdn.jsdelivr.net/npm/mocha@7.0.1/mocha.min.css
// @run-at document-start
// @grant GM_getValue
// @grant GM_setValue
@wahello
wahello / simple_args_parsing.sh
Created June 16, 2020 06:17 — forked from jehiah/simple_args_parsing.sh
a simple way to parse shell script arguments
#!/bin/sh
#
# a simple way to parse shell script arguments
#
# please edit and use to your hearts content
#
ENVIRONMENT="dev"
@wahello
wahello / AdbCommands
Created June 24, 2020 01:30 — forked from ernestkamara/AdbCommands
Adb useful commands list
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
== Shell
@wahello
wahello / gist:e37cfc0a2a1416f9f0c1e6eb01a49d1f
Created August 24, 2020 02:25 — forked from creativcoder/gist:5dc5c2e35cd218ce9b5d
Get list of installed packages(apps) in android via adb shell
Issue this command to terminal with your device connected :
$ adb shell pm list packages
If that doesn't work, then:
$ adb shell
$ su
$ pm list packages
@wahello
wahello / job_array_demo.sh
Created September 29, 2020 15:54 — forked from andersgs/job_array_demo.sh
Slurm job arrays
#!/bin/bash
# Illustrating the use of job arrays in SLURM
# use the command: sbatch --array=1-100 job_array_demo.sh
# Partition for the job:
#SBATCH -p main
# Multithreaded (SMP) job: must run on one node
#SBATCH --nodes=1