Skip to content

Instantly share code, notes, and snippets.

View gautric's full-sized avatar
🌊
仕事

Greg. A. gautric

🌊
仕事
View GitHub Profile
@gautric
gautric / halloween.py
Created October 30, 2022 16:37
halloween
# Code from
# https://learn.adafruit.com/micropython-basics-load-files-and-run-code/boot-scripts
# https://learn.adafruit.com/building-and-running-micropython-on-the-esp8266/micropython-usage
# https://docs.micropython.org/en/latest/esp8266/quickref.html#neopixel-driver
# https://docs.micropython.org/en/latest/esp8266/tutorial/neopixel.html
# sudo pip3 install adafruit-ampy
# export AMPY_PORT=/dev/cu.usbserial-14255
# ampy put test.py /main.py
# ampy run test.py
@gautric
gautric / pom.xml
Created April 12, 2021 14:45
Ldap Server
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>net.redhat.ldap</groupId>
<artifactId>ldap-service</artifactId>
<version>12.0.4</version>
@gautric
gautric / sevenseas.ldif
Last active April 12, 2021 14:45
sevenseas.ldif
# Sample LDIF data for the ApacheDS v1.0 Basic User's Guide
#
# Some sailors and their ships
# userpassword for all persons is "pass"
#
version: 1
dn: o=sevenSeas,dc=net
objectclass: dcObject
objectclass: organization
@gautric
gautric / macport
Last active September 29, 2023 15:05
macport
#!/bin/sh
## source : https://gist.github.com/gautric/b688593486fad342d2385af2124ac291
echo "#> sudo port -v selfupdate"
sudo port -v selfupdate
echo "#> sudo port upgrade outdated"
sudo port upgrade outdated
# Licensed to the Rhiot under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The licenses this file to You 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
@gautric
gautric / gist:a7fb99c349b118fe1624
Last active August 29, 2015 14:22
Burn and copy Image MacOS X
diskutil list
diskutil unmountDisk /dev/<disk# from diskutil>
sudo dd bs=1m if=path_of_your_image.img of=/dev/diskn
@gautric
gautric / newline_fixer.py
Created May 29, 2015 19:41
files list file for package 'xxx' is missing final newline
#!/usr/bin/python
# 8th November, 2009
# update manager failed, giving me the error:
# 'files list file for package 'xxx' is missing final newline' for every package.
# some Googling revealed that this problem was due to corrupt files(s) in /var/lib/dpkg/info/
# looping though those files revealed that some did not have a final new line
# this script will resolve that problem by appending a newline to all files that are missing it
# NOTE: you will need to run this script as root, e.g. sudo python newline_fixer.py
/**
* Licensed to the Camel Labs under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The licenses this file to You 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
*
@gautric
gautric / CamelMain.java
Last active August 29, 2015 14:21
CamelMain
package com.github.camellabs.component.pi4j;
import org.apache.camel.CamelContext;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.DefaultCamelContext;
import org.apache.camel.model.RouteDefinition;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**