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
<img src="https://cdn.my-awesome-website.com/images/some-image.gif" alt="Some animated image"> |
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 Prescott on 2015-05-08. | |
*/ | |
const ffi = require("ffi"); | |
// const ref = require('ref'); | |
/* | |
const intPtr = ref.refType(ref.types.int32); |
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 Canvas = require('canvas'); | |
const fs = require('fs'); | |
const canvas = new Canvas(640, 480); // creates 6400px * 480px canvas | |
const ctx = canvas.getContext('2d'); // get 2d context | |
// Fill background | |
ctx.fillStyle = "rgb(255, 255, 255)" | |
ctx.fillRect(0, 0, canvas.width, canvas.height); |
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 { text, send } = require('micro'); | |
const request = require('request'); | |
const debug = require('debug'); | |
const LOG_TAG = 'bosun-slack-proxy'; | |
debug.enable(LOG_TAG); | |
const log = debug(LOG_TAG); | |
module.exports = async (req, res) => { | |
const requestBody = await text(req); |
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
'use strict'; | |
const fs = require('fs'); | |
const Canvas = require('canvas'); | |
const width = 600; | |
const height = 300; | |
const canvas = new Canvas(width, height); // creates 400px * 200px size canvas | |
// draw |
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
#!/bin/bash | |
echo 'Checking last commit id' | |
# Change repo to monitor | |
GIT_REPO=https://github.com/torvalds/linux.git | |
LATEST_COMMIT_LOG=$(git ls-remote $GIT_REPO refs/heads/master) | |
LAST_FETCHED_COMMIT_LOG=$(cat /tmp/last-commit.log 2>/dev/null) |
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
#!/bin/bash | |
# First of all, you'll need ipcalc utility. | |
# ipcalc can be downloaded at jodies.de/ipcalc | |
WHOIS_QUERY = "some-netname" | |
whois -h whois.apnic.net $WHOIS_QUERY | grep inetnum | grep -Eo '[0-9].+' | sed 's/ //g' | xargs -I IP_RANGE sh -c 'ipcalc -rn IP_RANGE | tail -n +2' | |
# ###################### | |
# Explaination |
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
'use strict'; | |
const | |
path = require('path'), | |
webpack = require('webpack'), | |
ExtractTextPlugin = require('extract-text-webpack-plugin'), | |
HtmlWebpackPlugin = require('html-webpack-plugin'), | |
CopyWebpackPlugin = require('copy-webpack-plugin'), | |
dotenv = require('dotenv'), | |
isProduction = process.env.NODE_ENV === 'production', |
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
'use strict'; | |
const AWS = require('aws-sdk'); | |
const cloudwatch = new AWS.CloudWatch(); | |
const endDate = new Date(); | |
const startDate = new Date(endDate.getTime() - (3600 * 24 * 1000)); // 1 day ago | |
This file has been truncated, but you can view the full file.
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
14007 verbose addNameRange registry:https://registry.npmjs.org/resolve-dir not in flight; fetching | |
14008 silly resolveWithNewModule [email protected] checking installable status | |
14009 silly cache add args [ 'is-glob@^2.0.1', null ] | |
14010 verbose cache add spec is-glob@^2.0.1 | |
14011 silly cache add parsed spec Result { | |
14011 silly cache add raw: 'is-glob@^2.0.1', | |
14011 silly cache add scope: null, | |
14011 silly cache add escapedName: 'is-glob', | |
14011 silly cache add name: 'is-glob', | |
14011 silly cache add rawSpec: '^2.0.1', |