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
(ns p2048.core) | |
(def size 4) | |
(defn empty-line [] | |
(vec (replicate size 0))) | |
(defn gen-stage [] | |
(vec (for [x (range size)] | |
(empty-line)))) |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UI; | |
public class GameSystem : MonoBehaviour | |
{ | |
public Text text; | |
public int score = 0; | |
void Start() |
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
cinst mongodb |
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
#include <M5Stack.h> | |
static const uint16_t image_data_logo[57600] = { | |
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xfff |
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
#!/bin/bash | |
sudo yum update -y | |
sudo yum install gcc gcc-c++ libxml2-devel -y | |
wget http://jp2.php.net/get/php-7.2.4.tar.bz2/from/this/mirror -O php-7.2.4.tar.bz2 | |
tar jxvf php-7.2.4.tar.bz2 | |
mkdir -p php-lambda/php-bin | |
cd php-7.2.4 | |
./configure --prefix=/home/ec2-user/php-lambda/php-bin/ | |
make install |
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
import boto3 | |
import json | |
def lambda_handler(evt, context): | |
boto3.client('iot-data', region_name='ap-northeast-1').update_thing_shadow( | |
thingName = "bot", | |
payload=json.dumps({"state": {"desired": {"foo": 4}} }) | |
) |
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
(ns repeating-decimal) | |
(defn repeating-decimal [n] | |
(loop [rem 1 rems #{} divs [] i 0] | |
(let [div (int (/ (* rem 10) n)) | |
rem (mod (* rem 10) n)] | |
(if (and (not= rem 0) (contains? rems rem)) | |
[n divs] | |
(when (not= rem 0) | |
(recur rem (conj rems rem) (conj divs div) (inc i))))))) |
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
(ns hoge.core | |
(:use [clojure.string :only [reverse]])) | |
(def app (js/Vue. (clj->js {:el "#app" | |
:data {:message "Hello Vue from ClojureScript!"}}))) | |
;; (set! (.-message app) "new message") | |
(def app2 (js/Vue. (clj->js {:el "#app-2" | |
:data {:message (str "You loaded this page on " (js/Date.))}}))) |
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
'use strict' | |
const NodeWebcam = require( "node-webcam" ), | |
vision = require('google-cloud').vision, | |
notifier = require('node-notifier') | |
const visionClient = vision({ | |
projectId: process.env.GCLOUD_PROJECT, | |
keyFilename: './keyfile.json' | |
}) |
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
#define pin_A 0 | |
#define pin_B 14 | |
#define pin_C 13 | |
#define pin_D 12 | |
#define pin_E 15 | |
#define pin_F 16 | |
#define pin_G 2 | |
void setup() { | |
// put your setup code here, to run once: |
NewerOlder