I hereby claim:
- I am gudata on github.
- I am gudata (https://keybase.io/gudata) on keybase.
- I have a public key ASCT_tE4KgyeMRIAM0Qk5BIuLJWTkQWispj1RFCPkXZrjAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| MONGO_DATABASE="your_db_name" | |
| APP_NAME="mongo18" | |
| MONGO_HOST="172.19.0.2" | |
| MONGO_PORT="27017" | |
| TIMESTAMP=`date +%F-%H%M` | |
| MONGODUMP_PATH="/usr/bin/mongodump" | |
| BACKUPS_DIR="/opt/mongo-backup/backups/$APP_NAME" |
| #!/usr/bin/env bash | |
| set -x | |
| NS="ns1" | |
| VETH="veth1" | |
| VPEER="vpeer1" | |
| VETH_ADDR="10.200.1.1" | |
| VPEER_ADDR="10.200.1.2" |
| package singleton | |
| import ( | |
| "sync" | |
| ) | |
| type singleton struct { | |
| } | |
| var instance *singleton |
libnfc supports UUID writable cards and even has some dedicated tools for them.
However it doesn't work with some of the cards found on eBay that are even simpler to use. Sector 0 is unlocked and can be written without any additional commands. libnfc requires a small patch to get it working.
Following has been tested under ArchLinux with modified libnfc 1.5.1, mfoc 0.10.2 and a SCL3711 dongle.
The patch is fairly simple, open libnfc-1.5.1/utils/nfc-mfclassic.c and comment 2 lines (it was lines 384 and 385 for me):
// Try to write the trailer
| state_machine :state, initial: :init do | |
| before_transition any => any do |transition| | |
| @status_before_transition = transition.state_name | |
| end | |
| after_transition any => any do |transition| | |
| log = "#{@status_before_transition} -> #{transition.state_name}" | |
| SystemEvent.create(trackable: transition, description: log, tag: "state_change") | |
| end |
| #!/usr/bin/ruby | |
| require 'rubygems' | |
| require 'aws-sdk' | |
| require 'optparse' | |
| require 'json' | |
| discovery = {'data' => []} | |
| s3 = AWS::S3.new | |
| s3.buckets.each do |bucket| |
| # Create and enable a swap file | |
| have_file_swap = false | |
| File.open('/etc/fstab',"r") do |fstab| | |
| fstab.each do |line| | |
| # Tokenize each fstab line with a space separator | |
| tokens = line.split | |
| if tokens[2] == "swap" && tokens[0] !~ /\/dev/ | |
| have_file_swap = true |
| # Enable noatime on local ext3/4 & xfs filesystems | |
| fstab = File.open('/etc/fstab',"r") | |
| newlines = Array.new | |
| needremount = Array.new | |
| ihaveswap = false | |
| fstab.each do |line| | |
| # Tokenize each fstab line with a space separator | |
| tokens = line.split | |
| if tokens[2] == "swap" |