Skip to content

Instantly share code, notes, and snippets.

View TooBug's full-sized avatar
💭
I may be slow to respond.

TooBug TooBug

💭
I may be slow to respond.
View GitHub Profile
@imba-tjd
imba-tjd / .Cloud.md
Last active November 15, 2024 11:14
☁️ 一些免费的云资源

  • IaaS指提供系统(可以自己选)或者储存空间之类的硬件,软件要自己手动装。PaaS提供语言环境和框架(可以自己选)。SaaS只能使用开发好的软件(卖软件本身,如税务会计、表格文字)。BaaS一般类似于非关系数据库,但各家不通用
  • 云服务的特点:零前期成本&按需付费&弹性(类似于租,可随时多加、退掉;但没有残值)、高可用(放在机房中,不同AZ间水电隔离)

其他人的集合

@gautamsi
gautamsi / appointment.ts
Last active June 3, 2023 01:44
Fetch Appointments using ews-javascript-api
import { ExchangeService, ExchangeVersion, WebCredentials, Uri, DateTime, CalendarView, WellKnownFolderName, EwsLogging } from "ews-javascript-api";
import credentials = require("./credentials"); //for username and password
EwsLogging.DebugLogEnabled = false;
var service = new ExchangeService(ExchangeVersion.Exchange2010);
service.Credentials = new WebCredentials(credentials.userName, credentials.password);
service.Url = new Uri("https://outlook.office365.com/Ews/Exchange.asmx");
var view = new CalendarView(DateTime.Now.Add(-1, "week"), DateTime.Now); // appointments in last one week.

Electron Drag’n’Drop

Allows files(s) to be dragged inside the electron app as well as files to be dropped out (when dropped on the desktop e.g. the file will be copied to the destination.

Installation

Clone the Quick Start repository:
git clone https://github.com/electron/electron-quick-start

Go into the repository:

@SomMeri
SomMeri / html.html
Created July 19, 2013 12:53
Working source map for less
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="theme-simple-mixin.css">
<script src="less.min.js" type="text/javascript"></script>
<title>Less Demo</title>
</head>
<body>
<div class="box">
Box: both text and border colors are functions of the @base variable. <br> The border is 30% lighter and the text is 5% saturated.
@simplelife7
simplelife7 / html_encode.js
Created July 9, 2013 01:59
【JS】HTML转义
function htmlEncode(str) {
var div = document.createElement("div");
div.appendChild(document.createTextNode(str));
return div.innerHTML;
}
@undoZen
undoZen / less-middleware-with-sourcemap.js
Last active December 18, 2015 15:49
a simple less middleware with source map, usage: app.use(lessMiddleware(path.join(__dirname))); -- only works for __dirname right now.
var less = require('less');
var fs = require('fs');
var path = require('path');
var SourceMapGenerator = require('source-map').SourceMapGenerator
function errfn(callback) {
return function (err) {
if (err) callback.call(this, err);
else callback.apply(this, [].slice.apply(arguments).slice(1));
}
@yefuchs
yefuchs / gfw_contributors.md
Last active March 4, 2024 05:24
GFW Contributers

#The Great Firewall (GFW) Contributors List

注:数据来源为 dblp 和 cndblp, 下面括号中的数字表示 dblp 中显示的跟方滨兴合作论文的数量

###Binxing Fang (方滨兴)

中国工程院院士,北京邮电大学教授,中国科学院计算技术研究所网络方向首席科学家
http://en.wikipedia.org/wiki/Fang_Binxing

<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
@dexteryy
dexteryy / chinamap.js
Created March 6, 2012 08:03
Cross-browser Interactive map of China with Raphael.js
/**
* Cross-browser Interactive map of China with Raphael JavaScript Library $Rev$
* Created: dexter.yy
* Modified: $Author$ $LastChangedDate$
* note: 此处为源代码,提交svn时请发布压缩后的版本
*/
(function(){
var mapData = {
heilongjiang: { name: "黑龙江", path: "M432.7,36.8l-4.1-1c-1.2,1.3-2.5,2-4.2,2h-0.3c-1.5,0-2.8-0.5-3.8-1.3l-0.2-0.2v-3.7l-0.3-0.5L418,27l-0.6-3l-0.8-0.2c-2-0.8-3.3-2-3.9-3.8c-0.3-1.2-0.8-2.2-1.5-3.3l-1.3-1.7c-1.1-2.2-2.9-2.7-5.3-1.7c-2.2,1.2-4.3,1.2-6.2,0.4l-1.7-1.1l-1.8-2.2l-0.2-0.3l-0.6-1.7c-1.3-2.4-3.5-4.1-6.7-4.9l-3.8-0.4L373.1,0l-0.2,0.3c-2.1,1.7-4,3.8-5.3,6.7l3,1.1V8h0.2l3.8,0.8l0.3,2l-0.3,0.2l-0.5,0.6l-0.6,0.4l-0.1,0.5l0.8,1.5l1.6,2.4l0.1,1c0.5-1.8,1.7-2.9,3.4-3.4c0,0.8,0.3,1.3,1,1.8l1.3,1.3c0.5,0.2,0.4,0.7-0.6,1.5l-0.6,0.5l-0.3,0.9c-0.2,0.1-0.2,0.4-0.2,0.8v0.5l-0.5,1.6c-0.3,0.6-0.5,1.2-0.6,2.1l0.1,1.1l0.4,0.9l0.3,0.5l1.3,3.3l1,1.7l1.2,0.9l1.1,0.1l3.7-3l1.2-0.7l1.8-0.3l0.6,0.1l3.6,0.2l0.5-0.2l1.1-0.5l0.2-0.8c0.2-1,0.7-2,1.5-3l0.2-0.2c0.4-0.5,1-0.6,1.8-0.5c1.2-0.2,2,0.2,2.5,1c0.2,0.3,0.6,0.5,1,
@alotaiba
alotaiba / google_speech2text.md
Created February 3, 2012 13:20
Google Speech To Text API

Google Speech To Text API

Base URL: https://www.google.com/speech-api/v1/recognize
It accepts POST requests with voice file encoded in FLAC format, and query parameters for control.

Query Parameters

client
The client's name you're connecting from. For spoofing purposes, let's use chromium

lang
Speech language, for example, ar-QA for Qatari Arabic, or en-US for U.S. English