Skip to content

Instantly share code, notes, and snippets.

View datsuns's full-sized avatar
💭
drinkin(

Satoshi Bando datsuns

💭
drinkin(
View GitHub Profile
@datsuns
datsuns / Dockerfile
Created August 9, 2024 09:08
V2H docker
FROM ubuntu:20.04
ARG input=/tmp
ARG user=user
ARG git_email="you@example.com"
ARG git_name="Your Name"
ENV HOME=/home/${user}
ENV WORK=${HOME}/ai_sdk_work
ENV YOCTO_WORK=${WORK}/src_setup/yocto
@datsuns
datsuns / gemini.go
Last active March 28, 2024 08:33
gemini api by golang
package main
import (
"context"
"fmt"
"log"
"os"
"time"
"github.com/google/generative-ai-go/genai"
# 参考サイト: https://ponkichi.blog/drone01/
import socket
TELLO_IP = '192.168.10.1'
TELLO_CM_PORT = 8889
TELLO_ST_PORT = 8890
TELLO_ADDRESS = (TELLO_IP, TELLO_CM_PORT)
class TelloSock:
let g:lsp_settings = {
\ 'pylsp-all': {
\ 'workspace_config': {
\ 'pylsp': {
\ 'plugins': {
\ 'pycodestyle': {
\ 'ignore': ["E221", "E501"]
\ }
\ }
\ }
package main
import (
"bufio"
"fmt"
"io"
"os"
"os/exec"
"path/filepath"
package main
import (
"fmt"
"github.com/PuerkitoBio/goquery"
"os"
)
func LoadPage(path string) {
f, err := os.Open(path)
@datsuns
datsuns / sample_configure
Created December 17, 2013 14:15
sample configure of building CppUTest for stm32f4-discovery
CFLAGS="-mcpu=cortex-m4 -nostartfiles -T/Users/datsuns/work/programming/cpp/tdd4ec/stm32fdiscovery/ChibiOS/ChibiOS_2.6.1/os/ports/GCC/ARMCMx/STM32F4xx/ld/STM32F407xG.ld -Wl,-Map=build/ch.map,--cref,--no-warn-mismatch,--gc-sections -mno-thumb-interwork -mthumb" ./configure --host=arm-none-eabi --disable-memory-leak-detection --disable-std-cpp --disable-std-c
@datsuns
datsuns / rails-memo.markdown
Created September 4, 2012 16:44
Rails勉強メモ

Rails勉強メモ


読んだ本

  • Railsによるアジャイルwebアプリケーション開発

仕組み

@datsuns
datsuns / gist:2868831
Created June 4, 2012 14:48
gtestでパラメータライズテスト
#include <gtest/gtest.h>
class Hello {
public:
int ping( int a ){ return a; }
};
class HelloTest : public ::testing::TestWithParam<int> {
protected:
Hello hello;
@datsuns
datsuns / gist:2841487
Created May 31, 2012 06:26
sbt script for cygwin
SBT_DIR=`dirname $0`
java -Xmx512M -jar `cygpath -m $SBT_DIR`/sbt-launch.jar "$@"