Skip to content

Instantly share code, notes, and snippets.

@majorvin
majorvin / ckad-bookmarks.html
Created November 27, 2020 04:13 — forked from runlevl4/ckad-bookmarks.html
CKAD Bookmarks (** indicates example source) [originally sourced from https://github.com/nikhilagrawal577/ckad-notes]
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
DO NOT EDIT! -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
<DL><p>
<DT><H3 ADD_DATE="1576816453" LAST_MODIFIED="1578776782">CKAD</H3>
<DL><p>
@majorvin
majorvin / Update git fork with tags.sh
Created September 25, 2020 19:19 — forked from Saissaken/Update git fork with tags.sh
Update git fork with tags
# Repo: someuser/myframework
# Fork: superteam/myframework
# Track:
git clone https://github.com/superteam/myframework.git
cd myframework
git remote add upstream https://github.com/someuser/myframework.git
# Update:
git fetch upstream
@majorvin
majorvin / nextcloud
Last active February 10, 2021 03:53
nextcloud
# run scan all to cache all
cd /config/www/nextcloud/
sudo -u abc php ./occ files:scan --all
# SNAP
sudo nextcloud.occ files:scan --all
04e96153c5d4539367cbaf244397b0eb307fec334718f966fb456508d4d4dc78c1c16c972e202a48cbe21387b0b1751c0371693bf6c26585e04e01d1a18b46a15c;hisea
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice, MonkeyImage
import time
# connection to the current device, and return a MonkeyDevice object
device = MonkeyRunner.waitForConnection()
for num in range(1,1000):
device.touch(560,400, 'DOWN_AND_UP')
time.sleep(0.1)
@majorvin
majorvin / branch
Created September 19, 2014 14:53
Delete all local branch
# Delete all merged local branch
git branch --merged | grep -v \* | xargs git branch -D
# Delete all local branches
git branch | grep -v \* | xargs git branch -D
@majorvin
majorvin / delete_all_branch
Created July 7, 2014 17:19
Delete all branch except for master
git branch | grep -v "master" | xargs git branch -D
# specs and cukes results are stored in JUnit format under test-reports
if (grep 'failures="[^0]"' test-reports/* || grep 'errors="[^0]"' test-reports/*); then
curl -H "Authorization: token MY_TOKEN" --request POST --data '{"state": "failure", "description": "Failed!", "target_url": "${bamboo.buildResultsUrl}"}' https://api.github.com/repos/USER/REPO/statuses/${bamboo.repository.revision.number} > /dev/null
else
curl -H "Authorization: token MY_TOKEN" --request POST --data '{"state": "success", "description": "Success!", "target_url": "${bamboo.buildResultsUrl}"}' https://api.github.com/repos/USER/REPO/statuses/${bamboo.repository.revision.number} > /dev/null
fi