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
[ | |
{ | |
"createdDate": "2023-04-04T17:06:12.261866", | |
"closingDate": "2023-07-03T17:06:10", | |
"listingTime": 1680627970, | |
"expirationTime": 1688403970, | |
"orderHash": "0xad8718bfd02fc4c3afcaad8dc9f13265ce46cd09dc15ec6385c152ad8482e8c3", | |
"maker": { | |
"address": "0x2d0024f74ed381167b37f18c9f09f72226523072", | |
"config": "", |
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
/** | |
* Retrieves all the rows in the active spreadsheet that contain data and logs the | |
* values for each row. | |
* For more information on using the Spreadsheet API, see | |
* https://developers.google.com/apps-script/service_spreadsheet | |
*/ | |
function readRows() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var rows = sheet.getDataRange(); | |
var numRows = rows.getNumRows(); |
I recently had the following problem:
- From an unattended shell script (called by Jenkins), run a command-line tool that accesses the MySQL database on another host.
- That tool doesn't know that the database is on another host, plus the MySQL port on that host is firewalled and not accessible from other machines.
We didn't want to open the MySQL port to the network, but it's possible to SSH from the Jenkins machine to the MySQL machine. So, basically you would do something like
ssh -L 3306:localhost:3306 remotehost
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
// Hours [0, ...23] | |
function offsetHour (hour, offset) { | |
return (((hour + offset) % 24) + 24) % 24 | |
} |
The problem is that some lines in the file are missing timestamps when they aren't continuations of any previous line. It's dumb, really.
The mysql query log is seriously bullshit format, but nothing logstash can't unscrew.
The main goal here is to show how we can fix the 'missing timestamp' problem.
% ruby bin/logstash agent -e '
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
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
set normal (set_color normal) | |
set magenta (set_color magenta) | |
set yellow (set_color yellow) | |
set green (set_color green) | |
set red (set_color red) | |
set gray (set_color -o black) | |
# Fish git prompt | |
set __fish_git_prompt_showdirtystate 'yes' | |
set __fish_git_prompt_showstashstate 'yes' |
Using a simple javascript client
const jayson = require('jayson');
const Promise = require('bluebird');
// create a client
const client = jayson.client.http({
port: 3000,
hostname: 'localhost'
var cluster = require('cluster');
var http = require('http');
if (cluster.isMaster) {
var worker = cluster.fork();
cluster.on('exit', function(worker, code, signal) {
console.log('worker ' + worker.process.pid + ' died');
});
NewerOlder