Skip to content

Instantly share code, notes, and snippets.

View uyorum's full-sized avatar

uyorum uyorum

View GitHub Profile
@uyorum
uyorum / radonly-sdcard-octopi.sh
Last active January 7, 2024 14:06
Enable read-only sdcard on Octopi
#!/bin/bash
set -eu
echo "Stopping log emiting services..."
systemctl stop syslog.socket
systemctl stop rsyslog
systemctl stop octoprint
systemctl stop klipper
@uyorum
uyorum / Dockerfile
Created May 6, 2021 13:41
Dockerfile for ruby-centos7
FROM centos:7 as builder
RUN yum install -y git make gcc bzip2 openssl-devel libyaml-devel libffi-devel readline-devel zlib-devel gdbm-devel ncurses-devel && \
git clone https://github.com/rbenv/ruby-build.git && \
PREFIX=/usr/local ./ruby-build/install.sh
ARG RUBY_VERSION
ENV RUBY_VERSION=${RUBY_VERSION:-2.7.3}
ENV RUBY_DIR=/usr/local/ruby-${RUBY_VERSION}
RUN /usr/local/bin/ruby-build ${RUBY_VERSION} ${RUBY_DIR}
@uyorum
uyorum / boot.ipxe
Last active December 2, 2022 01:14
Preseed for Debian stretch (Replace "root-password-crypted" line)
#!ipxe
dhcp
initrd http://ftp.jp.debian.org/debian/dists/stretch/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz
kernel http://ftp.jp.debian.org/debian/dists/stretch/main/installer-amd64/current/images/netboot/debian-installer/amd64/linux auto=true priority=critical url=http://${dhcp-server}/preseed.cfg suite=stretch
boot
@uyorum
uyorum / init.js
Created September 2, 2017 01:57
TSL2561 on Mongoose OS
load('api_config.js');
load('api_mqtt.js');
load('api_net.js');
load('api_sys.js');
load('api_timer.js');
load('api_i2c.js');
let address = 0x39;
let bus = I2C.get();
// Enable device
#!/usr/bin/env python
import smbus
import time
class TSL2561:
def __init__(self, address, channel, gain=0x00, integration_time=0x02):
self.address = address
self.channel = channel
@uyorum
uyorum / ks-centos6.cfg
Last active May 16, 2016 13:19
Kickstart for CentOS6 (Replace "rootpw" line)
# Kickstart file to install CentOS6
install
url --url=http://ftp.riken.jp/Linux/centos/6/os/x86_64
text
lang en_US.UTF-8
keyboard jp106
# Network configuration
@uyorum
uyorum / ks-centos7.cfg
Last active May 16, 2016 13:18
Kickstart for CentOS7 (Replace "rootpw" line)
# Kickstart file to install CentOS7
# Use network installation
install
url --url=http://ftp.riken.jp/Linux/centos/7/os/x86_64
text
firstboot --enable
ignoredisk --only-use=sda
keyboard --vckeymap=jp --xlayouts='jp'
@uyorum
uyorum / docker-compose.yml
Last active April 20, 2016 02:03
docker-compose.yml which starts gogs and drone
gogs:
image: gogs/gogs
ports:
- "8080:8080"
- "10022:22"
volumes_from:
- gogs_data
links:
- gogs_db:gogs_db