Skip to content

Instantly share code, notes, and snippets.

View NewFuture's full-sized avatar
🖥️
:octocat:

New Future NewFuture

🖥️
:octocat:
View GitHub Profile
// dotnet add package Azure.Storage.Blobs
// dotnet add package Azure.Storage.Blobs.Batch
using Azure.Storage.Blobs;
using Azure.Storage.Blobs.Models;
using Azure.Storage.Blobs.Specialized;
// Get a connection string to our Azure Storage account.
const string connectionString = "";
const string containerName = "";
@NewFuture
NewFuture / line.css
Last active September 17, 2019 01:50
div {
background:
linear-gradient(45deg, red 25%, transparent 25%),
linear-gradient(125deg, red 25%, transparent 25%);
}
@NewFuture
NewFuture / post-commit
Last active March 29, 2019 12:55
git tag package.json
#! /bin/bash
version=`git diff HEAD^..HEAD -- "$(git rev-parse --show-toplevel)"/package.json | grep '^\+.*version' | sed -s 's/[^0-9\.]//g'`
if [ "$version" != "" ]; then
git tag -a "v$version" -m "`git log -1 --format=%s`"
echo "Created a new tag, v$version"
fi
rm -rf /data/data/com.chaozhuo.texteditor.phoenixos
rm -rf /data/data/com.chaozhuo.filemanager.phoenixos
rm -rf /data/data/com.chaozhuo.browser.x86
rm -rf /data/data/com.tencent.tmgp.pubgmhd/files/tss_tmp
echo "O98K"
declare global {
interface Date {
format(fmt: string): string;
isToday(): boolean;
}
}
let week = ["一", "二", "三", "四", "五", "六", "日"];
let week_pre = ["", "周", "星期"];
Date.prototype.format = function (fmt: string): string {
var o = {
@NewFuture
NewFuture / b.py
Last active August 27, 2017 09:42
#!/usr/bin/env python3
import collections
def get_isosceles_trapezoid_num(edges):
d={}
sorted(edges)
for edge in edges:
d[edge] = d.get(edge,0) + 1
#字典排序
#删除文件和历史记录
git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch {path-of-remove-file}' --prune-empty --tag-name-filter cat -- --all
#删除远程分支
git push origin --delete {branchname}
git push origin --delete tag {tag name}
alias YAF='docker run -it --rm -p8080:80 -v"$(pwd)":/newfuture/yaf newfuture/yaf'
@NewFuture
NewFuture / sslocal
Last active October 22, 2016 11:44 — forked from Jimmy-Xu/sslocal
/etc/init.d/sslocal
#!/bin/bash
set -e
### BEGIN INIT INFO
# Provides: sslocal
# Required-Start: $syslog $remote_fs
# Required-Stop: $syslog $remote_fs
# Should-Start:
# Should-Stop:
# Default-Start: 2 3 4 5
@NewFuture
NewFuture / Github.reg
Last active October 22, 2016 08:08
putty theme
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Github]
"Colour0"="62,62,62"
"Colour1"="201,85,0"
"Colour2"="244,244,244"
"Colour3"="244,244,244"
"Colour4"="63,63,63"
"Colour5"="62,62,62"
"Colour6"="62,62,62"