$ openssl genrsa -out private.key 4096openssl req -new -sha256 \| import React from "react"; | |
| const FeatureFlags = React.createContext(null); | |
| export function FeatureProvider({ features = null, children }) { | |
| if (features === null || typeof features !== "object") { | |
| throw new TypeError("The features prop must be an object or an array."); | |
| } | |
| return ( | |
| <FeatureFlags.Provider value={features}>{children}</FeatureFlags.Provider> |
| public static class AzureScaleUtil | |
| { | |
| public static void ScaleAzureWebApp(string appId, string appSecret, string tenantId, string subscriptionId, string resourceGroupName, string appServicePlanName, | |
| string tier) | |
| { | |
| Trace.WriteLine("Beginning Azure Web App Scale Event"); | |
| var pricingTier = GetPricingTier(tier); | |
| var authority = $"https://login.windows.net/{tenantId}"; | |
| var resource = "https://management.azure.com/"; |
| --- | |
| - name: Install docker | |
| gather_facts: No | |
| hosts: default | |
| tasks: | |
| - name: Install yum utils | |
| yum: | |
| name: yum-utils | |
| state: latest |
| input { | |
| file { | |
| path => /tmp/application.log | |
| codec => multiline { | |
| pattern => "^(%{TIMESTAMP_ISO8601})" | |
| negate => true | |
| what => "previous" | |
| } | |
| } | |
| } |
bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...
| using System; | |
| using System.Collections.Generic; | |
| using System.Data.SqlClient; | |
| using System.Linq; | |
| using System.Collections; | |
| using System.Data; | |
| namespace SqlParameterHelper | |
| { | |
| /// <summary> |
| /* | |
| * Inspired by: http://stackoverflow.com/questions/4360060/video-streaming-with-html-5-via-node-js | |
| */ | |
| var http = require('http'), | |
| fs = require('fs'), | |
| util = require('util'); | |
| http.createServer(function (req, res) { | |
| var path = 'video.mp4'; |
| using System; | |
| using System.Text; | |
| using System.Xml; | |
| using System.Xml.Linq; | |
| static string PrettyXml(string xml) | |
| { | |
| var stringBuilder = new StringBuilder(); | |
| var element = XElement.Parse(xml); |
| $ git branch -r --merged | | |
| grep origin | | |
| grep -v '>' | | |
| grep -v master | | |
| xargs -L1 | | |
| awk '{split($0,a,"/"); print a[2]}' | | |
| xargs git push origin --delete |