Skip to content

Instantly share code, notes, and snippets.

@guitarmasaki
guitarmasaki / intel_x520_patcher.py
Created February 28, 2022 14:50 — forked from ixs/intel_x520_patcher.py
Intel x520 EEPROM Patcher allows to unlock the x520 network card to work with non-intel branded SFP modules.
#!/usr/bin/env python3
#
# Simple Intel x520 EEPROM patcher
# Modifies the EEPROM to unlock the card for non-intel branded SFP modules.
#
# Copyright 2020 Andreas Thienemann <andreas@bawue.net>
#
# Licensed under the GPLv3
#
# Based on research described at https://forums.servethehome.com/index.php?threads/patching-intel-x520-eeprom-to-unlock-all-sfp-transceivers.24634/
@guitarmasaki
guitarmasaki / Wireless Shutter for X100 Camera
Created September 30, 2017 03:07 — forked from anonymous/Wireless Shutter for X100 Camera
Arduino code for wireless "wired" shutter release
/*
*************************** Wireless Shutter For X100 Camera **********************************************
( cable release cameras )
code for controlling a servo thats wirelessly triggered
Created 23 February 2013
by Andrew D. Farquharson
More at www.handya.co.nz
#!/bin/sh
# Start ssh-agent and register environment variables permanently in HKCU.
# Copyright (C) 2013 YAEGASHI Takeshi <t@keshi.org>
# Use a fixed path for the ssh-agent socket endpoint.
# SSH_FIXED_SOCK="/tmp/ssh-agent-$(id -u).sock"
eval $(ssh-agent -k)
/**
* cybozu-connect for Node
*/
var jsdom = require('jsdom'),
XMLHttpRequest = require('XMLHttpRequest').XMLHttpRequest;
var document,
window,
$,
CBLabs = {},
RewriteEngine on
RewriteRule ^([0-9,a-z,A-Z,_]+).ics+ index.php?data=$1
#!/usr/lib/python
#vim:fileencoding=utf-8
import time
import re
import twitter
class tweetDM:
def __init__(self, account, passwd, access_token_key, access_token_secret, id_file, user_file):
self.api = twitter.Api(account, passwd, access_token_key, access_token_secret)
#!/bin/bash
LANG=ja_JP.utf8
pid=$$
date=`date '+%Y-%m-%d-%H_%M'`
playerurl=http://radiko.jp/player/swf/player_3.0.0.01.swf
playerfile="/tmp/player.swf"
keyfile="/tmp/authkey.png"
@guitarmasaki
guitarmasaki / gist:4282916
Created December 14, 2012 05:33
PQI Air CardからRubyでFlickrにポストするスクリプト。大部分はひとりぶろぐさんのデジカメ内部でRubyを動かす狂気!無線LAN内蔵SDカードアダプタPQI Air Cardの間違った使い方 http://hitoriblog.com/?p=12627を流用させていただいてます。
#!/usr/arm-linux/bin/ruby
# -*- coding: utf-8 -*-
require 'net/http'
require 'uri'
#require 'pp'
#require 'rubygems'
require 'flickraw'
#load('/mnt/sd/config.rb')
<?php
//require("../debuglib.php");
mb_internal_encoding("UTF-8");
//取得元
$url = "https://graph.facebook.com/207945416007551/photos";
//取得したJSONを配列$objに格納
$obj = json_decode(file_get_contents($url), true);
<?php
//取得元
$url = "https://graph.facebook.com/207945416007551/photos";
//取得したJSONを配列$objに格納
$obj = json_decode(file_get_contents($url), true);
//$objは多元連想配列なのでループを2重に回して$val1配列に入れる
foreach($obj as $key => $value) {
foreach($value as $key => $val1) {