Skip to content

Instantly share code, notes, and snippets.

View inhere's full-sized avatar
😃
working, learning ...

Inhere inhere

😃
working, learning ...
View GitHub Profile
@XVilka
XVilka / TrueColour.md
Last active July 9, 2024 23:28
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
@albulescu
albulescu / download.go
Created March 25, 2016 09:44
golang download file with progress
package main
/**
* @website http://albulescu.ro
* @author Cosmin Albulescu <cosmin@albulescu.ro>
*/
import (
"bytes"
"fmt"
@tlikai
tlikai / export_mysql_table_schema_to_markdown_table.php
Last active October 1, 2020 01:07
export mysql table schema to markdown table
#!/usr/bin/env php
<?php
if (count($argv) == 1) {
throw new InvalidArgumentException('Missing tables');
}
$tables = array_slice($argv, 1);
$db = new PDO('mysql:dbname=uniqueway_development;host=127.0.0.1;charset=utf8mb4', 'root', '');
@tduarte
tduarte / publish-ghpages.md
Last active May 18, 2024 13:52
If you need to force push an subtree
git checkout master # you can avoid this line if you are in master...
git subtree split --prefix dist -b gh-pages # create a local gh-pages branch containing the splitted output folder
git push -f origin gh-pages:gh-pages # force the push of the gh-pages branch to the remote gh-pages branch at origin
git branch -D gh-pages # delete the local gh-pages because you will need it: ref
@inhere
inhere / riot-message.tag
Created February 7, 2017 04:01
riot tag component 'message' and 'pagination', basic style support by bootstrap 3
<message>
<div class="msg-box bg-{ opts.type || 'info' } fade-{ fadeMode }" if={ opts.text }>
<button type="button" class="close" onclick={ closeBox } if={ opts.close }>
<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
</button>
<h4 class="msg-title" if={ opts.title }>{ opts.title }</h4>
<ul class="msg-body">
<!-- <li><yield/></li> -->
@inhere
inhere / url_hash_and_h5_history.js
Created January 11, 2018 03:43
url hash和html5 history使用
/**
* HashHistory
* @link https://zhuanlan.zhihu.com/p/27588422
*/
// hash的改变会自动添加到浏览器的访问历史记录中。
function pushHash (path) {
window.location.hash = path
}
@inhere
inhere / local_cookie_sess_storage.js
Created January 11, 2018 03:45
浏览器本地存储 cookies, session, localStorage 使用包装
@inhere
inhere / js_extra_util.js
Last active January 11, 2018 03:47
常用的js函数,工具类封装 收集
const extra = {}
// 密码检测密码强度
extra.checkStrength = function (sValue) {
let modes = 0
if (sValue.length < 1) return modes
// 正则表达式验证符合要求的
@inhere
inhere / raw_js_ajax.js
Created January 11, 2018 03:49
原生js发送ajax
// @from http://www.cnblogs.com/kazetotori/p/6037940.html
// ajax函数的默认参数
var ajaxOptions = {
url: '#',
method: 'GET',
async: true,
timeout: 0,
data: null,
dataType: 'text',
headers: {},