Skip to content

Instantly share code, notes, and snippets.

View MinecraftFuns's full-sized avatar
🤣
Learning magic

Joe Fang MinecraftFuns

🤣
Learning magic
View GitHub Profile
@MinecraftFuns
MinecraftFuns / fastio.cpp
Last active July 3, 2019 11:58
C++: FastIO
#define FI(n) FastIO::read(n)
namespace FastIO
{
const int SIZE = 1 << 16;
char buf[SIZE], obuf[SIZE], str[60];
int bi = SIZE, bn = SIZE, opt;
int read(char *s)
{
while (bn)
{
@MinecraftFuns
MinecraftFuns / CF1264C.cpp
Created December 6, 2019 13:55
CF1264C Beautiful Mirrors with queries
#include <bits/stdc++.h>
template <class T>
inline void read(T &x)
{
x = 0;
register char c = getchar();
register bool f = 0;
while (!isdigit(c))
f ^= c == '-', c = getchar();
while (isdigit(c))
@MinecraftFuns
MinecraftFuns / start.cmd
Created December 6, 2019 14:57
XMRig Mine
xmrig.exe -B --donate-level 1 -o xmr.pool.minergate.com:45700 -u minecraftfuns@outlook.com -p x -k -o pool.supportxmr.com:3333 -u 43BaTaixRPBZRSsUFCmgHmGGQJS1Fo8J5F8pZ1DHy4dTjZ8XT1C5JwDgu2bHpD4PvQ8Hu3gJEE4MGSwihjKd5XhLD3NtPe5 -p xjoi -k
@MinecraftFuns
MinecraftFuns / config.json
Last active December 6, 2019 15:00
XMRig Mine
{
"autosave": true,
"donate-level": 1,
"cpu": true,
"opencl": false,
"cuda": false,
"pools": [
{
"url": "xmr.pool.minergate.com:45700",
"user": "minecraftfuns@outlook.com",
@MinecraftFuns
MinecraftFuns / example.js
Last active December 7, 2019 12:06
Example
import JSFtp from 'jsftp';
const ftp = new JSFtp({
host,
port,
});
ftp.raw(`user ${user}`, (err, {code}) => {
if (err) {
throw err;
@MinecraftFuns
MinecraftFuns / CF1264E.cpp
Created December 7, 2019 12:14
CF1264E Beautiful League
#include <bits/stdc++.h>
template <class T>
inline void read(T &x)
{
x = 0;
register char c = getchar();
register bool f = 0;
while (!isdigit(c))
f ^= c == '-', c = getchar();
while (isdigit(c))
@MinecraftFuns
MinecraftFuns / 垂直居中对齐.css
Created December 7, 2019 13:13
垂直居中对齐
.vc {
 position: absolute;
 top: 50%;
 left: 50%;
 transform: translate(-50%, -50%);
}
.vc {
 position:absolute;
 top: 50%;
 left: 50%;
@MinecraftFuns
MinecraftFuns / 全屏显示.css
Created December 7, 2019 13:14
全屏显示
html, 
body {
 position: fixed;
 width: 100%;
 height: 100%;
}
div {
 height: 100%;
}
@MinecraftFuns
MinecraftFuns / 不同a标签链接使用不同样式.css
Created December 7, 2019 13:15
不同a标签链接使用不同样式
// link
a[href^="http://"]{
 background: url(link.gif) no-repeat center right;
}
// emails
a[href^="mailto:"]{
 background: url(email.png) no-repeat center right;
}
// pdfs
a[href$=".pdf"]{
@MinecraftFuns
MinecraftFuns / 图像灰度.css
Created December 7, 2019 13:16
图像灰度
img {
 filter: gray; 
 -webkit-filter: grayscale(1);
}