This file contains hidden or 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
| body { | |
| background: #36393e; | |
| color: #bfbfbf; | |
| font-family: sans-serif; | |
| margin: 0 | |
| } | |
| h1 { | |
| font-size: 1.7rem; | |
| margin-top: 1rem; |
This file contains hidden or 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
| const fs = require('fs'); | |
| const highlight = (src, theme) => { | |
| theme = theme || { | |
| 'const' : 35, | |
| 'throw' : 35, | |
| 'new' : 33, | |
| 'var' : 33, | |
| 'if' : 36, | |
| 'else' : 36, |
This file contains hidden or 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
| const fs = require('fs'); | |
| const draw = (src, line, column, n) => { | |
| n = n || 3; | |
| const lines = src.split('\n'); | |
| const start = Math.max(line - n, 0); | |
| const end = Math.min(lines.length, line + n); | |
| const context = lines.slice(start, end).map((text, i) => { | |
| const curr = start + i + 1; | |
| const out = `${curr} ${text}`; |
This file contains hidden or 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
| // http://wiki.sankuai.com/display/DEV/MBTI_Result | |
| var o = $('#main-content').html().match(/[EINSTFJP]{4}/ig).map(x => x.toUpperCase()) | |
| .reduce(function(o, x, i, a) { | |
| o[x] = o[x] || {}; | |
| o[x].n = (o[x].n || 0) + 1; | |
| o[x].p = ((o[x].n / a.length) * 100).toFixed(2); | |
| return o; | |
| }, {}); |
This file contains hidden or 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
| #用户名 | |
| #rpc-user=user | |
| #密码 | |
| #rpc-passwd=passwd | |
| #上面的认证方式不建议使用,建议使用下面的token方式 | |
| #设置加密的密钥 | |
| #rpc-secret=token | |
| #允许rpc | |
| enable-rpc=true | |
| #允许所有来源, web界面跨域权限需要 |
This file contains hidden or 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
| $GPVTG,,,,,,,,,N*30 | |
| $GPGGA,132403.00,,,,,0,00,99.99,,,,,,*61 | |
| $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30 | |
| $GPGSV,1,1,01,11,,,19*70 | |
| $GPGLL,,,,,132403.00,V,N*4D | |
| $GPRMC,132404.00,V,,,,,,,070217,,,N*7E | |
| $GPVTG,,,,,,,,,N*30 | |
| $GPGGA,132404.00,,,,,0,00,99.99,,,,,,*66 | |
| $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30 | |
| $GPGSV,1,1,01,11,,,19*70 |
This file contains hidden or 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/env node | |
| // | |
| // ~$ yarn add superagent cheerio | |
| // ~$ ./iguooo.js > gifs.list | |
| // ~$ cat iguooo.list | awk '{ print $1 }' | wget -Nci - | |
| // | |
| const cheerio = require('cheerio'); | |
| const request = require('superagent'); | |
| const regexp = /background-image:\s?url\([\'"]?(.[^\'"]+)[\'"]?\)/; |
This file contains hidden or 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
| void send_sms(String message, String phone_nr ) | |
| { | |
| byte original_byte; | |
| byte newbyte; | |
| int pdu_length; | |
| int counter; | |
| String newphone_nr; | |
| int numlength; | |
| delay(1000); |
This file contains hidden or 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
| /* | |
| PduEncoder.cpp - Message PDU format encoder library | |
| Author : Ludovic Laurent. | |
| This library is free software; you can redistribute it and/or | |
| modify it under the terms of the GNU Lesser General Public | |
| License as published by the Free Software Foundation; either | |
| version 2.1 of the License, or (at your option) any later version. | |
| This library is distributed in the hope that it will be useful, |
This file contains hidden or 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
| /* | |
| * created by Rui Santos, http://randomnerdtutorials.com | |
| * | |
| * Complete Guide for Ultrasonic Sensor HC-SR04 | |
| * | |
| Ultrasonic sensor Pins: | |
| VCC: +5VDC | |
| Trig : Trigger (INPUT) - Pin11 | |
| Echo: Echo (OUTPUT) - Pin 12 | |
| GND: GND |