Skip to content

Instantly share code, notes, and snippets.

View puhitaku's full-sized avatar
:octocat:
= 🐙 + 🐱

Takumi Sueda puhitaku

:octocat:
= 🐙 + 🐱
View GitHub Profile
@tokibito
tokibito / client1.py
Last active September 23, 2016 15:15
PythonのsocketモジュールでHello, world!
"""
socketモジュールを使ってHello, World
"""
import socket
bind_address = '127.0.0.1'
bind_port = 7777
def main():
@xspager
xspager / temp.py
Created June 23, 2016 22:27
Keep showing the temperature of the Zynq chip (tested on the Parallella board)
#!/usr/bin/env python2
# coding: utf-8
# based on https://github.com/parallella/parallella-utils/blob/master/xtemp/xtemp.c
import time
offset = int(open("/sys/bus/iio/devices/iio:device0/in_temp0_offset").read())
scale = float(open("/sys/bus/iio/devices/iio:device0/in_temp0_scale").read())
raw_temp_file = open("/sys/bus/iio/devices/iio:device0/in_temp0_raw")
@gonzaloserrano
gonzaloserrano / log.go
Created August 18, 2015 17:56
logrus wrapper
package log
import (
"fmt"
"github.com/Sirupsen/logrus"
"runtime"
"strings"
)
var logger = logrus.New()

Elixir勉強会(社内向け)Aug 19 2015

前回までのあらすじ

  • Elixirがどこかで流行っているプログラミング言語だということがわかった
  • 動的型付けの関数型言語だった
  • Elixirの文法の雰囲気がちょっとわかった
  • 色々なことがほんのりとわかった気になれた
  • OTP
@colindean
colindean / displaylink_crunchbang_jessie.md
Last active January 23, 2023 21:25
HOWTO: Use a DisplayLink USB graphics adapter on Crunchbang Linux v11 Waldorf with partial upgrade to Debian Jessie
@nvsofts
nvsofts / proxy.rb
Last active August 29, 2015 14:10
某小学4年生のサイトをハックするプロキシサーバ
#!/usr/bin/env ruby
require 'webrick'
require 'webrick/httpproxy'
BIND_ADDR = '127.0.0.1'
PORT = 8080
SCORE = 12345678
@cryptix
cryptix / vineScrape.go
Created August 27, 2014 12:31
extract a javascript object value from a html page using goquery and otto
package main
import (
"errors"
"log"
"os"
"github.com/PuerkitoBio/goquery"
"github.com/robertkrimen/otto"
)
@ktmud
ktmud / gulpfile.js
Last active February 28, 2022 10:39
An example gulpfile.js with bower components and live reload support
var BatchStream = require('batch-stream2')
var gulp = require('gulp')
var coffee = require('gulp-coffee')
var uglify = require('gulp-uglify')
var cssmin = require('gulp-minify-css')
var bower = require('gulp-bower-files')
var stylus = require('gulp-stylus')
var livereload = require('gulp-livereload')
var include = require('gulp-include')
var concat = require('gulp-concat')
@dan-blanchard
dan-blanchard / .1.miniconda.md
Last active December 11, 2019 22:38
Quicker Travis builds that rely on numpy and scipy using Miniconda

For ETS's SKLL project, we found out the hard way that Travis-CI's support for numpy and scipy is pretty abysmal. There are pre-installed versions of numpy for some versions of Python, but those are seriously out of date, and scipy is not there are at all. The two most popular approaches for working around this are to (1) build everything from scratch, or (2) use apt-get to install more recent (but still out of date) versions of numpy and scipy. Both of these approaches lead to longer build times, and with the second approach, you still don't have the most recent versions of anything. To circumvent these issues, we've switched to using Miniconda (Anaconda's lightweight cousin) to install everything.

A template for installing a simple Python package that relies on numpy and scipy using Miniconda is provided below. Since it's a common s

@rob-murray
rob-murray / add_intellij_launcer
Last active April 25, 2025 00:26
Add Intellij launcher shortcut and icon for ubuntu
// create file:
sudo vim /usr/share/applications/intellij.desktop
// add the following
[Desktop Entry]
Version=13.0
Type=Application
Terminal=false
Icon[en_US]=/home/rob/.intellij-13/bin/idea.png
Name[en_US]=IntelliJ