This file contains 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
diskutil list | |
diskutil unmountDisk /dev/disk2 | |
diskutil eraseDisk FAT32 SANDISK /dev/disk2 |
This file contains 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
# Output to a jpeg file | |
set terminal jpeg size 1280,720 | |
# Set the aspect ratio of the graph | |
set size 1, 1 | |
# The file to write to | |
set output "timeseries.jpg" | |
# The graph title |
This file contains 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
# Upload | |
rsync -av -e "ssh -A JUMP_HOST ssh" FILE_TO_SEND DEST_HOST:/home/gareth/ | |
# Download | |
rsync -av -e "ssh -A JUMP_HOST ssh" DEST_HOST:~/FILE_TO_DOWNLOAD ~/Downloads/ |
This file contains 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
// Go to the Inbox | |
// Unfold label menus (only labels visible to you will be collected) | |
// Open a console | |
var elementsWithDataLabel = document.querySelectorAll('[data-label-name]'); | |
var dataLabelValues = Array.from(elementsWithDataLabel).map(el => el.getAttribute('data-label-name')); | |
dataLabelValues.forEach(value => { | |
console.log(value); |
This file contains 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 'rspec/rails' | |
require 'factory_bot' | |
require Rails.root.join('spec', 'support', 'load_file_fixtures') | |
require Rails.root.join('spec', 'support', 'email_helpers') | |
RSpec.configure do |config| | |
config.fixture_path = "#{::Rails.root}/spec/fixtures" | |
end | |
factory_users = User.pluck(:id) - [1,2,3,4,5,6,7] |
This file contains 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
# Generate Private Key | |
$ openssl genrsa -out server.key 2048 | |
# Generate CSR | |
$ openssl req -new -out server.csr -key server.key -config openssl.cnf | |
# => Fill in info | |
# Check CSR | |
$ openssl req -text -noout -in server.csr | |
# Sign Cert | |
$ openssl x509 -req -days 3650 -in server.csr -signkey server.key -out server.crt -extensions v3_req -extfile openssl.cnf |
This file contains 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/env ruby | |
require 'octokit' | |
require 'pp' | |
require 'csv' | |
GITHUB_TOKEN = ENV['GITHUB_TOKEN'].freeze | |
SINCE=ARGV[0].freeze | |
client = Octokit::Client.new(access_token: GITHUB_TOKEN) |
This file contains 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
# Host | |
# ------------------------------------------------------------------------------ | |
# Go to your main code directory | |
cd ~/Code | |
# Clone alaveteli | |
git clone --recursive https://github.com/mysociety/alaveteli.git | |
cd alaveteli | |
git checkout master # Or the specific version a site is running on, e.g. `0.20.0.14` |
This file contains 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
; Start a new pool named 'www'. | |
[www] | |
; The address on which to accept FastCGI requests. | |
; Valid syntaxes are: | |
; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on | |
; a specific port; | |
; 'port' - to listen on a TCP socket to all addresses on a | |
; specific port; | |
; '/path/to/unix/socket' - to listen on a unix socket. |
This file contains 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
<details open> | |
<summary style="display: block;">Block summary</summary> | |
<p>After block summary elements</p> | |
</details> | |
<br> | |
<br> | |
<details open> | |
<summary>Inline summary</summary> |
NewerOlder