jq 'map(.foo)'
[ { foo: 1 }, { foo: 2 } ]
[1, 2]
package com.codeshane.examples.java; | |
/* Examples of merging bit-masks with bitwise-or. | |
* Also available via http://snipt.org/vgxg5 | |
* | |
* @author codeshane.com | |
* @version 1 | |
* | |
*/ | |
@echo off | |
echo " " | |
echo " dtg.bat - Redirect command output to a file named as " | |
echo " a 'prefix' suffixed with the date ^& time group (DTG). " | |
echo " " | |
echo " Usage: dtg prefix <command [-params]> " | |
echo " Filename: prefix_yyyy-mm-dd_hh-mm.txt " | |
echo " " | |
for /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set thedate=%%c-%%a-%%b) | |
for /f "tokens=1-2 delims=/:" %%a in ("%TIME%") do (set thetime=%%a-%%b) |
for /R . %%G IN (*.*) do move "%%G" .. |
#!/bin/sh | |
# | |
# View or Change Local System Names | |
# | |
# to view: ./name.sh | |
# to change: ./name.sh newname | |
# passwordless: sudo ./name.sh | |
# | |
if [ -z ${1+x} ] |
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAxiZpCBe7YAbIsft0P7FdUtjBgZ8DzuWenzFRFig7NZT4DBrPd3aaBaWdjk0VjNk6NohLOer/AiY3u4WqiLuyi7XbDgNh564xmazC384omDVKabhkAPE/RkJn+GODYLhYXR7hqO/OAK8QL9MBemBA4U/XpWsykMZcNtQ5UDJ2c219U6Ul1dG0dfY10mnU4LDoUGIg3EGRJwSuEhvbIe7pg+niIJw2ZeHv6YLV0AMFPfdmIAy/gKGJAOP4Nm5jUreUb3XnHE2tPXXOom8jqvu5EjfFM4qsWyuBWWkW3M+FsltKDcqTuAucl/s44INsjvbWinbPRkl7RzWI6enE7j7mlQ== cp-node |
# bourne shell functions below take 1 argument, the file_to_hash. | |
# prints hex digest on stdout | |
md5() { | |
perl -MDigest::MD5=md5_hex -le'print md5_hex(<> or die)' "$1" | |
# ruby -rdigest/md5 -e"puts Digest::MD5.file'/dev/null'" | |
# python -sBc "import hashlib;print hashlib.md5(open('$1','rb').read()).hexdigest()" | |
# md5 "$1"|cut -d' ' -f4 # mac | |
# md5sum "$1"|cut -d' ' -f1 # linux | |
# openssl md5 "$1" | grep -o '[[:xdigit:]][[:xdigit:]]*$' | cat |
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine | |
# This is how I upload my new Sol Trader builds (http://soltrader.net) | |
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
S3KEY="my aws key" | |
S3SECRET="my aws secret" # pass these in | |
function putS3 | |
{ | |
path=$1 |
<!DOCTYPE html> | |
<html> | |
<head><title>Javascript RT</title></head> | |
<style>canvas {width: 1280px; height: 768px}</style> | |
<body> | |
<canvas id="framebuffer"></canvas> | |
<script type="text/javascript"> | |
/* Fizzlefade using a Feistel network. |