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
$ unzip consul.zip | |
Archive: consul.zip | |
inflating: consul |
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
$ wget https://releases.hashicorp.com/consul/1.4.3/consul_1.4.3_linux_amd64.zip -O consul.zip | |
--2019-03-10 00:14:07-- https://releases.hashicorp.com/consul/1.4.3/consul_1.4.3_linux_amd64.zip | |
Resolving releases.hashicorp.com (releases.hashicorp.com)... 151.101.37.183, 2a04:4e42:9::439 | |
Connecting to releases.hashicorp.com (releases.hashicorp.com)|151.101.37.183|:443... connected. | |
HTTP request sent, awaiting response... 200 OK | |
Length: 34777003 (33M) [application/zip] | |
Saving to: ‘consul.zip’ | |
consul.zip 100%[============================>] 33.17M 4.46MB/s in 9.2s |
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/env ruby | |
def flatten(array) | |
array.each_with_object([]) do |e, flat| | |
flat.push *(e.is_a?(Array) ? flatten(e) : e) | |
end | |
end | |
print flatten([[1, 2, 3, 4], 5, 6, [[7, 8], 9, 0]]) |
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
These are the code parts to grab related to this blog post. | |
Read more about it there | |
http://www.igumbi.com/en/blog/YAML-to-JSON-Rails-for-i18n-Language-Files | |
# The locale file structure de.yml | |
de: | |
obt: |
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
#!/bin/bash | |
# bash generate random alphanumeric string | |
# | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
# bash generate random 32 character alphanumeric string (lowercase only) | |
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 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
;; command to comment/uncomment text | |
(defun insilico-mode-comment-dwim (arg) | |
"Comment or uncomment current line or region in a smart way. For detail, see comment-dwim'." | |
(interactive "*P") | |
(require 'newcomment) | |
(let ((comment-start "\"") (comment-end "\"") (comment-padding nil)) | |
(comment-dwim arg))) | |
;; A custom mode for editing insilico isf files | |
;; keywords for syntax coloring |
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
// This is just a pseudo-code. | |
// | |
// File: common_header.hpp | |
// | |
void current(state_type &variables, state_type &dxdt, const double t, int index, vector<string> var_param_names_from_isf) { | |
// this fucntion has common code | |
// just that the name for variable is acquired from | |
// var_param_names_from_isf vector by accessing its index | |
// e.g. index x - var_param_names_from_isf[x] |
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
// Timing the performance | |
// Example: '\n' vs std::endl | |
// The winner is given at the end | |
#include <cmath> | |
#include <iostream> | |
#include <fstream> | |
#include <time.h> |
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
==> Upgrading 1 outdated package, with result: | |
git 2.3.0 | |
==> Upgrading git | |
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/git-2.3.0.yosemite.bottle.tar.gz | |
curl: (60) SSL certificate problem: Invalid certificate chain | |
More details here: http://curl.haxx.se/docs/sslcerts.html | |
curl performs SSL certificate verification by default, using a "bundle" | |
of Certificate Authority (CA) public keys (CA certs). If the default |
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
[test-X9DAi:13934] *** Process received signal *** | |
[test-X9DAi:13934] Signal: Segmentation fault (11) | |
[test-X9DAi:13934] Signal code: Address not mapped (1) | |
[test-X9DAi:13934] Failing at address: 0xd8dc3be9 | |
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::mpi::exception> >' | |
what(): MPI_Send: MPI_ERR_COUNT: invalid count argument | |
[test-X9DAi:13933] *** Process received signal *** | |
[test-X9DAi:13933] Signal: Aborted (6) | |
[test-X9DAi:13933] Signal code: (-6) | |
[test-X9DAi:13934] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x36d40) [0x7fab82bb3d40] |
NewerOlder