The content below is a copy-paste-modify-add job on existing content. The original content was written by bakpakin. Errors are likely mine.
(Links to source reference commit 0277187)
| # frozen_string_literal: true | |
| require "rubygems/package" | |
| require "net/http" | |
| require "tmpdir" | |
| queue = Queue.new | |
| Gem::SpecFetcher.new.available_specs(:latest).first.each do |source, gems| | |
| gems.each do |tuple| | |
| gem_name = File.basename(tuple.spec_name, ".gemspec") |
| require "json" | |
| struct = { "a" => 1, "b" => 2, "c" => [1, 2, 3], "d" => [{ "e" => 3 }, nil, false, true, [], {}] } | |
| source = JSON.dump(struct) | |
| tokens = [] | |
| index = 0 | |
| until source.empty? | |
| tokens << |
The content below is a copy-paste-modify-add job on existing content. The original content was written by bakpakin. Errors are likely mine.
(Links to source reference commit 0277187)
| default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam' | |
| default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes' | |
| default['sshd']['sshd_config']['PasswordAuthentication'] = 'no' |
Custom format for displaying bytes as kb, mb, gb or tb.
Response to a few places on the internet: https://productforums.google.com/forum/#!topic/docs/x_T_N-yRUYg And here: https://stackoverflow.com/questions/1533811/how-can-i-format-bytes-a-cell-in-excel-as-kb-mb-gb-etc
Here is one that I have been using:
[<1000000]0.00," KB";[<1000000000]0.00,," MB";0.00,,," GB"
| import Html exposing (..) | |
| import Keyboard | |
| import Window exposing (Size) | |
| import AnimationFrame | |
| import Task | |
| import Html.App as App | |
| import Collage exposing (..) | |
| import Element exposing (..) |
This tutorial will turn your Raspberry PI into a simple Bluetooth audio receiver, which plays music through connected speakers. It's like a regular car audio system, but it can be used anywhere and it's a good value.
Audio source (i.e. smartphone)
|
v
((( Wireless Bluetooth Channel )))
|
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
| # A sample Gemfile | |
| source "http://rubygems.org" | |
| gem "redis" | |
| gem 'eventmachine', :git => 'git://github.com/eventmachine/eventmachine.git' | |
| gem "em-hiredis" | |
| # gem "em-synchrony" | |
| gem "em-websocket" |