This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<body> | |
<div style="height: 51px; width: 54px; margin: 0px auto; overflow: hidden; background-image: url(loader.png); background-repeat: no-repeat;"> | |
<style type="text/css">.disqus-loader{animation:disqus-embed-spinner .7s infinite linear;-webkit-animation:disqus-embed-spinner .7s infinite linear}@keyframes disqus-embed-spinner{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@-webkit-keyframes disqus-embed-spinner{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}</style> | |
<div class="disqus-loader" style="width: 29px; height: 29px; margin: 11px 14px; transform-origin: 50% 50% 0px; background-image: url(loader.png); background-position: -54px 0px; background-repeat: no-repeat;"></div> | |
</div> | |
</body> | |
</html> |

This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dir=/data | |
continue=true | |
input-file=/conf/aria2.session | |
save-session=/conf/aria2.session | |
save-session-interval=60 | |
force-save=true | |
enable-mmap=true | |
disk-cache=512M | |
file-allocation=falloc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# see: https://gist.github.com/todgru/6224848 | |
session="one1" | |
tmux start-server | |
tmux new-session -d -s $session | |
tmux send-keys C-m # ignore errors. see:https://github.com/tmux/tmux/issues/1173#issuecomment-347496 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <time.h> | |
static long currentTimeInNs() { | |
struct timespec res; | |
clock_gettime(CLOCK_MONOTONIC, &res); | |
return (res.tv_sec * 1e9) + res.tv_nsec; | |
} | |
static long currentTimeInMs(void) { | |
struct timespec res; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# coding=utf-8 | |
import smtplib | |
from email.mime.text import MIMEText | |
class Sms(object): | |
def __init__(self, mail_host, mail_user, mail_pswd): | |
self._mail_host = mail_host |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class WaveHelper { | |
private File mFile; | |
private int mSample; | |
private int mChannel; | |
private int mSampleBits; | |
private LittleEndianDataOutputStream mDos; | |
public WaveHelper(File file, int channel, int sample, int encoding) { | |
mFile = file; | |
mSample = sample; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Installing collected packages: requests | |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import re | |
import requests | |
from datetime import datetime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <chrono> | |
typedef std::chrono::high_resolution_clock Time; | |
typedef std::chrono::milliseconds ms; | |
typedef std::chrono::nanoseconds ns; | |
auto start = Time::now(); | |
ns d1 = std::chrono::duration_cast<ns>(Time::now() - start); | |
ms d2 = std::chrono::duration_cast<ms>(Time::now() - start); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FpsMonitor { | |
private static final int SAMPLE_COUNT = 10; | |
private ArrayBlockingQueue<Long> mQueue; | |
private long mLastUpdateTime; | |
public FpsMonitor() { | |
mQueue = new ArrayBlockingQueue<>(SAMPLE_COUNT); | |
mLastUpdateTime = System.currentTimeMillis(); | |
} |
NewerOlder