https://twitter.com/RM011011010/status/591068399570014208
ターミナルを開く
cd /tmp を実行
cat > girlfriend.c を実行
以下の内容を貼り付けEnterを押したのちCtrl+Dを押す
| /* | |
| * Copyright 2015 Kazunori Jo | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <strings.h> | |
| struct entry { | |
| char name[32]; | |
| char sex; | |
| int age; | |
| struct entry *next; |
| /* | |
| * Ex2_4_1 | |
| * | |
| * Copyright (c) 2015 Kazunori Jo | |
| * | |
| * This software is released under the MIT License. | |
| * http://opensource.org/licenses/mit-license.php | |
| */ | |
| import java.awt.BorderLayout; |
| /lost+found/#10001: C source, ASCII text | |
| /lost+found/#10002: C source, ASCII text | |
| /lost+found/#10003: C source, ASCII text | |
| /lost+found/#10004: C source, ASCII text | |
| /lost+found/#10005: directory | |
| /lost+found/#10010: C source, ASCII text | |
| /lost+found/#10011: C source, ASCII text | |
| /lost+found/#10012: C source, ASCII text | |
| /lost+found/#10013: ASCII text | |
| /lost+found/#10014: ASCII text |
| function fizzBuzz() { | |
| for (var i = 1; i <= 30; i++) { | |
| if (i % 15 == 0) { | |
| alert('Fizz Buzz'); | |
| } else if (i % 3 == 0) { | |
| alert ('Fizz'); | |
| } else if (i % 5 == 0) { | |
| alert('Buzz'); | |
| } else { | |
| alert(i); |
| function nabeatsu() { | |
| for (var i = 1; i <= 99; i++) { | |
| if (i % 3 == 0 || i % 10 == 3 || (i > 10 && i % 30 < 10)) { | |
| alert('アホ'); | |
| } else { | |
| alert(i); | |
| } | |
| } | |
| } |
| var john = { | |
| firstName: "John", | |
| lastName: "Smith", | |
| }; | |
| var joanna = { | |
| firstName: "Joanna", | |
| lastName: "Doe", | |
| }; |
https://twitter.com/RM011011010/status/591068399570014208
ターミナルを開く
cd /tmp を実行
cat > girlfriend.c を実行
以下の内容を貼り付けEnterを押したのちCtrl+Dを押す
jq -s '{ response: [( (.[0].response | sort_by(.name)) as $a | (.[1].response | sort_by(.name)) as $b | ($a | length) as $length | $a[] as $item | $item + $b[range(0;$length)] )] }' a.json b.json
a.json
{
"response": [
{
"station_ja": "新宿",