chlorine / memos_migr.py
0 Favoriten
0 Forks
1 Dateien
Zuletzt aktiv
1 | import sqlite3 |
2 | |
3 | conn_source = sqlite3.connect('db/source.db') |
4 | conn_target = sqlite3.connect('db/memos_prod.db') |
5 | |
6 | cur_source = conn_source.cursor() |
7 | cur_target = conn_target.cursor() |
8 | |
9 | #? change here |
10 | cur_source.execute('SELECT * FROM tag') |
penn / gist:675ac8dafa964442a0a32d702f41fc73
0 Favoriten
0 Forks
1 Dateien
Zuletzt aktiv
1 | <?php |
2 | $curl = curl_init(); |
3 | curl_setopt_array($curl, array( |
4 | CURLOPT_URL => "https://v2.api-m.com/api/heisi", |
5 | CURLOPT_RETURNTRANSFER => true, |
6 | CURLOPT_ENCODING => '', |
7 | CURLOPT_MAXREDIRS => 10, |
8 | CURLOPT_TIMEOUT => 30, |
9 | CURLOPT_FOLLOWLOCATION => true, |
10 | CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, |
penn / gist:b44097ccc74f4fbe81f7d4bc5d23b576
0 Favoriten
0 Forks
1 Dateien
Zuletzt aktiv
1 | nmcli connection add type team con-name team0 ifname team0 autoconnect yes config '{"runner": {"name": "activebackup"}}' |
chlorine / time-fmt.min.js
0 Favoriten
0 Forks
1 Dateien
Zuletzt aktiv
1 | const tzArr=["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"],sdArr=["夜半","鸡鸣","平旦","日出","食时","隅中","日中","日昳","晡时","日入","黄昏","人定"],sdArr2=["半夜","凌晨","黎明","清晨","早上","上午","中午","午后","下午","傍晚","晚上","深夜"];function formatTime(r){const t=new Date,o=new Date(r),e=t-o,n=Math.floor(e/1e3),u=Math.floor(n/60),f=Math.floor(u/60),a=Math.floor(f/24);if(n<60)return"刚刚";if(u<60)return`${u} 分钟前`;if(f<24)return`${f} 小时前`;if(a<7)return`${a} 天前 ${formatHour(o)}`;const $=t.getFullYear(),m=o.getFullYear();return $===m?`${o.getMonth()+1} 月 ${o.getDate()} 日 ${formatHour(o)}`:`${m} 年 ${o.getMonth()+1} 月 ${o.getDate()} 日 ${formatHour(o)}`}function formatHour(r){const t=r.getHours(),o=r.getMinutes(),e=Math.floor((t+1)/2)%12;return`${`${formatNumber(t)}:${formatNumber(o)}`} • ${tzArr[e]}时 ${sdArr[e]} (${sdArr2[e]})`}function formatNumber(r){return r<10?`0${r}`:r} |
chlorine / whispe.html
0 Favoriten
0 Forks
1 Dateien
Zuletzt aktiv
1 | {{ with resources.Get "css/addon/whisper.css" }} |
2 | <style> |
3 | {{ .Content | safeCSS }} |
4 | </style> |
5 | {{ end }} |
6 | |
7 | <body> |
8 | <div id="toots-content" class="toots-container"> |
9 | <div id="toots"></div> |
10 | <div id="toots-loading" class="loading-container" style="display: none;"> |
chlorine / whispe.css
0 Favoriten
0 Forks
1 Dateien
Zuletzt aktiv
1 | :root { |
2 | --primary-color: #657786; |
3 | --bg-color: #1387cf; |
4 | --hover-bg-color: #1991db; |
5 | --border-color: #888888; |
6 | --spinner-color: #1da1f2; |
7 | --padding-small: 12px; |
8 | --padding-medium: 16px; |
9 | --margin-small: 10px; |
10 | --margin-medium: 16px; |
Neuer
Älter