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
| public static class CoreTools | |
| { | |
| public static async Task<string> GetRedirectedUrl(string url) | |
| { | |
| //this allows you to set the settings so that we can get the redirect url | |
| var handler = new HttpClientHandler() | |
| { | |
| AllowAutoRedirect = false | |
| }; | |
| string redirectedUrl = 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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Threading; | |
| using System.Threading.Tasks; | |
| using Microsoft.Extensions.Hosting; | |
| namespace WebApplication24 | |
| { | |
| public abstract class HostedService : IHostedService |
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 functions = require('firebase-functions'); | |
| const gcs = require('@google-cloud/storage')(); | |
| const sharp = require('sharp') | |
| const _ = require('lodash'); | |
| const path = require('path'); | |
| const os = require('os'); | |
| exports.generateThumbnail = functions.storage.object('uploads/{imageId}').onChange(event => { | |
| const object = event.data; // The Storage object. |
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
| // = Requirements: freetype 2.5, libpng, libicu, libz, libzip2 | |
| // = How to compile: | |
| // % export CXXFLAGS=`pkg-config --cflags freetype2 libpng` | |
| // % export LDFLAGS=`pkg-config --libs freetype2 libpng` | |
| // % clang++ -o clfontpng -static $(CXXFLAGS) clfontpng.cc $(LDFLAGS) \ | |
| // -licuuc -lz -lbz2 | |
| #include <cassert> | |
| #include <cctype> | |
| #include <iostream> | |
| #include <memory> |
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
| var r = require('rethinkdb'); | |
| // How many connections in the pool? | |
| // 2547 will fail with "(libuv) Failed to create kqueue (24)" | |
| var CONNECTIONS = 2546; | |
| // Insert this many rows | |
| var COUNT = 10000; | |
| // Database to use for the test | |
| var DB = 'test' | |
| // Table to use for the test |
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
| require 'tire' | |
| # Tire.configure { logger STDERR, level: 'debug' } | |
| Tire.index('movie-titles') do | |
| delete | |
| create \ | |
| settings: { | |
| index: { | |
| analysis: { |