{"componentChunkName":"component---node-modules-gatsby-theme-blog-core-src-templates-post-query-js","path":"/quicktip-base64-in-the-shell/","result":{"data":{"site":{"siteMetadata":{"title":"one melo a day","social":[{"name":"twitter","url":"https://twitter.com/melo0187"},{"name":"github","url":"https://github.com/melo0187"}]}},"blogPost":{"__typename":"MdxBlogPost","id":"904a26f2-0fb1-548c-be24-cbaca2b3ffbf","excerpt":"Recently I found myself looking on some base64 encoded values while debugging. I had an assumption about inputs and wanted to tell if the…","body":"function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"layout\": \"post\",\n  \"title\": \"Quicktip: Working with base64 in the shell\",\n  \"author\": \"melo\",\n  \"date\": \"2016-07-15T08:05:43.000Z\",\n  \"categories\": [\"Aside\", \"Technical\"],\n  \"slug\": \"quicktip-base64-in-the-shell\",\n  \"draft\": false,\n  \"meta_title\": \"Quicktip: Working with base64 in the shell\"\n};\n\nvar makeShortcode = function makeShortcode(name) {\n  return function MDXDefaultShortcode(props) {\n    console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\");\n    return mdx(\"div\", props);\n  };\n};\n\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, [\"components\"]);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"p\", null, \"Recently I found myself looking on some base64 encoded values while debugging. I had an assumption about inputs and wanted to tell if the string I was looking at was the correct base64 encoded representation of those inputs. I needed a quick answer and I did not want to use one of the base64 encoders/decoders that are available online. Turns out with Bash (or Cygwin, if you use Windows) you have everything you need for this simple task: \", \"[\", \"code language=\\u201Cbash\\u201D\", \"]\", \" $ echo -n \\u201Cparam1:param2\\u201D | base64 cGFyYW0xOnBhcmFtMg== $ echo -n \\u201CcGFyYW0xOnBhcmFtMg==\\u201D | base64 -d param1:param2 \", \"[\", \"/code\", \"]\", \" Just be sure to add  \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"-n\"), \"  option for echo, otherwise a newline is added and encoded!\"));\n}\n;\nMDXContent.isMDXComponent = true;","slug":"/quicktip-base64-in-the-shell/","title":"Quicktip: Working with base64 in the shell","tags":[],"keywords":[],"date":"July 15, 2016"},"previous":{"__typename":"MdxBlogPost","id":"37b4d733-9fc3-52e9-b9ae-8a3c6dad7578","excerpt":"Make use of DSM Directory Server as Gitblit authentication provider","slug":"/integrate-gitblit-with-ldap/","title":"Integrating GitBlit with Directory Server","date":"July 12, 2016"},"next":{"__typename":"MdxBlogPost","id":"149e1334-c17d-55f2-bdc7-1c033ed5b101","excerpt":"Last week I was surprised to see that the DS apps on my Android phone weren't able to connect to my DiskStation anymore. I found out that…","slug":"/quicktip-android-ds-apps-connection-issue-workaround/","title":"Quicktip: If your DS Apps on Android can't connect anymore","date":"August 31, 2016"}},"pageContext":{"isCreatedByStatefulCreatePages":false,"id":"904a26f2-0fb1-548c-be24-cbaca2b3ffbf","previousId":"37b4d733-9fc3-52e9-b9ae-8a3c6dad7578","nextId":"149e1334-c17d-55f2-bdc7-1c033ed5b101"}}}