All of the following information is based on go version go1.17.1 darwin/amd64
.
GOOS | Out of the Box |
---|---|
aix |
✅ |
android |
✅ |
sudo chmod 777 / | |
sudo chmod 777 -R / | |
Linux下以上命令的危害性,试过的人都会觉得可怕,有些人遇到这种情况,第一反应是没救了,其实,你要愿意花功夫去折腾,还是有办法滴! | |
下面理了下怎么折腾: | |
道具: | |
A、B两台电脑,假设都装着Ubuntu 12.04版本的系统,都能ssh、root(平时装Linux的时候这两个最好都弄好了,以备不时之需)。 | |
情景: | |
现假设「A」是那台悲剧的执行过「sudo chmod 777 /」的电脑,什么效果,就不说了,反正不是什么好事,如果好奇,一试便知! |
#!/usr/bin/env python3 | |
import sys | |
import re | |
import ipaddress | |
import requests | |
baseurl = "https://btapi.ipip.net/host/info" | |
user_agent = "ipip/tt" | |
accept_encoding = 'gzip' | |
ip_re = re.compile(r''' |
<!DOCTYPE html> | |
<html> | |
<head> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet@1/dist/leaflet.min.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet.markercluster@1/dist/MarkerCluster.min.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet.markercluster@1/dist/MarkerCluster.Default.min.css"> | |
<style> | |
html, body, #map { | |
width: 100vw; | |
height: 100vh; |
#!/bin/bash | |
target_branch="production" | |
working_tree="PATH_TO_DEPLOY" | |
while read oldrev newrev refname | |
do | |
branch=$(git rev-parse --symbolic --abbrev-ref $refname) | |
if [ -n "$branch" ] && [ "$target_branch" == "$branch" ]; then | |
#! /bin/bash | |
# | |
# Shell script for install Curl with HTTP2 support. Script run on Ubuntu 16.04, 18.04 or 20.04 | |
# | |
# Notes: | |
# - Ubuntu environment is assumed | |
# - I did run shell script on Ubuntu 18.04 | |
# | |
# Gratitude: |
# luna_pinyin.custom.yaml | |
# | |
# 【朙月拼音】模糊音定製模板 | |
# 佛振配製 :-) | |
# | |
# 位置: | |
# ~/.config/ibus/rime (Linux) | |
# ~/Library/Rime (Mac OS) | |
# %APPDATA%\Rime (Windows) | |
# |
$ git checkout --orphan NEWBRANCH
$ git rm -rf .
--orphan
creates a new branch, but it starts without any commit. After running the above command you are on a new branch "NEWBRANCH", and the first commit you create from this state will start a new history without any ancestry.
You can then start adding files and commit them and they will live in their own branch. If you take a look at the log, you will see that it is isolated from the original log.
Note: This gist may be outdated, thanks to all contributors in comments.
adb
is the Android CLI tool with which you can interact with your android device, from your PC
You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.
Don't hesitate to read comments, there is useful tips, thanks guys for this !