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
| DeviceDescriptor { | |
| bLength: 18, | |
| bDescriptorType: 1, | |
| bcdUSB: 512, | |
| bDeviceClass: 239, | |
| bDeviceSubClass: 2, | |
| bDeviceProtocol: 1, | |
| bMaxPacketSize: 64, | |
| idVendor: 7899, | |
| idProduct: 55822, |
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 std::{fmt, io}; | |
| use std::fmt::{Display, Formatter}; | |
| use std::time::SystemTime; | |
| const SPACER: &str = " "; | |
| impl Display for Field { | |
| fn fmt(&self, f: &mut Formatter) -> fmt::Result { | |
| let result: char = match self { | |
| Field::Empty => ' ', |
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 milan on 2016-04-02. | |
| * HappyLog skeleton generator (DokuWiki format) | |
| */ | |
| "use strict"; | |
| let strftime = require('strftime'); | |
| let day = new Date(); | |
| day.setDate(1); | |
| day.setMonth(day.getMonth()); | |
| let month = day.getMonth(); |
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/python | |
| import os | |
| from collections import defaultdict | |
| import subprocess | |
| kafka_log_dir = "/var/lib/kafka/data/" | |
| size_unit = pow(1024.0, 2) # mbs |
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
| # Whitelist office IP's only | |
| kubectl -n istio-system patch svc istio-ingressgateway -p '{"spec":{"externalTrafficPolicy": "Local"}}' | |
| ingressgatewaypod=$(kubectl -n istio-system get pods -l app=istio-ingressgateway -o name | cut -d / -f 2) | |
| kubectl -n istio-system delete pod $ingressgatewaypod | |
| # If this rule needs changing then delete previous isntances beforehand, otherwise it does not seem to be picked up | |
| # kubectl -n istio-system delete handler whitelistip | |
| # kubectl -n istio-system delete instance sourceip | |
| # kubectl -n istio-system delete rule checkip | |
| kubectl apply -f - <<EOF | |
| apiVersion: config.istio.io/v1alpha2 |
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
| r.db("rethinkdb").table("stats") | |
| .hasFields('db', 'table') | |
| .group('db', 'table') | |
| .map(doc => doc('storage_engine')('disk')('space_usage')('data_bytes').default(0)) | |
| .sum() | |
| .ungroup() | |
| .map(doc => ({db: doc('group').nth(0), table: doc('group').nth(1), size: doc('reduction').div(1024).div(1024)})) | |
| .orderBy(r.desc('size')); |
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
| document.getElementsByTagName('video')[0].playbackRate = 1.1 |
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
| -- See here for an explanation on when is restart or reload needed: | |
| -- https://blog.dbi-services.com/which-parameter-changes-do-require-a-restart-of-my-postgresql-instance/ | |
| show random_page_cost ; | |
| -- this will make reads better on SSDs and really should be the default: | |
| alter system set random_page_cost=1; | |
| select * from pg_reload_conf(); | |
| show random_page_cost ; |
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
| > node-rdkafka@2.2.3 preinstall /usr/lib/node_modules/node-rdkafka | |
| > node util/configure | |
| checking for OS or distribution... ok (Linux) | |
| checking for C compiler from CC env... failed | |
| checking for gcc (by command)... ok | |
| checking for C++ compiler from CXX env... failed | |
| checking for C++ compiler (g++)... ok | |
| checking executable ld... ok | |
| checking executable nm... ok |
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
| 0 info it worked if it ends with ok | |
| 1 verbose cli [ '/usr/bin/node', | |
| 1 verbose cli '/usr/bin/npm', | |
| 1 verbose cli 'i', | |
| 1 verbose cli 'git+https://git@github.com/Blizzard/node-rdkafka.git' ] | |
| 2 info using npm@4.6.1 | |
| 3 info using node@v8.9.1 | |
| 4 silly install loadCurrentTree | |
| 5 silly install readLocalPackageData | |
| 6 silly fetchPackageMetaData git+https://git@github.com/Blizzard/node-rdkafka.git |
NewerOlder