Skip to content

Instantly share code, notes, and snippets.

mactkg mactkg

Block or report user

Report or block mactkg

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:825381
View rturtle0.js
//
// The TURTLE interpreter / javascript
//
//
/**
* String trim method (for IE)
*/
if (!String.prototype.trim) {
String.prototype.trim = function() {
View gist:845907
<VirtualHost *>
ServerName www.makerbox.net
</VirtualHost>
<VirtualHost *>
ServerName plone.makerbox.net
RewriteEngine On
RewriteRule ^/(.*) http://192.168.0.253:8080/plonetest/VirtualHostBase/http/plone.makerbox.net:80/VirturalHostRoot/$1 [L,P]
</VirtualHost>
View gist:856564
<VirtualHost *>
ServerName www.makerbox.net
RewriteEngine On
RewriteRule ^/plonetest(.*) http://localhost:8080/VirtualHostBase/http/www.makerbox.net:80/plone
test/VirtualHostRoot/_vh_plonetest/$0 [L,P]
</VirtualHost>
<VirtualHost *>
ServerName plone.makerbox.net
RewriteEngine On
RewriteRule ^(.*) http://localhost:8080/VirtualHostBase/http/plone.makerbox.net:80/plonetest/Vir
View ren33.c
#include<stdio.h>
main(){
int c;
while((c=getchar())!='z'){
if(96 < c && c < 123) c = c - 32;
printf("%c", c);
}
return 0;
}
View techhub_intent.java
Intent intent = new Intent(helloworld.this.hogehoge.class);
intent.setAction(Intent_ACTION_VIEW);
startActivity(intent);
// if you want return some information, you should use startActivityForResult().
View rad of2point.cpp
#include <math.h>
#define _USE_MATH_DEFINES
#include <iostream>
double LengthCos(double t1,t2,t3,f1,f2,f3) {
return sqrt(((t1-f1)*(t1-f1)+(t3-f3)*(t3-f3)))/sqrt(((t1-f1)*(t1-f1)+(t2-f2)*(t2-f2)+(t3-f3)*(t3-f3)));
}
double LengthDegree(double t1,t3,f1,f3) {
return sqrt((t1-f1)*(t1-f1))/sqrt(((t1-f1)*(t1-f1)+(t3-f3)*(t3-f3)));
View hoge.py
import time, urllib
end = 0
for i in range(5):
url = "http://www.switch-science.com/products/detail.php?product_id=" + str(i)
time.sleep(1)
if(url != IOError):
f = urllib.urlopen(url)
print str(i) + ":read"
View .vimrc
syntax enable
filetype plugin indent on
" neocomplcache
let g:neocomplcache_enable_underbar_completion = 1
" neocomplcache
let g:NeoComplCache_EnableAtStartup = 1
" 大文字小文字を区別する
let g:NeoComplCache_SmartCase = 1
" キャメルケース補完を有効にする
View gist:996976
\begin{table}[hbtp]
\caption{使用機器一覧}
\label{table:whatuse}
\begin{center}
\begin{tabular}{cccc}
\hline
使用機器 & 製造メーカー & 型番 & 製造番号 \\
\hline \hline
ステッピングモータ & - & - & - \\
ステッピングモータIC & - & LSI8255 & - \\
You can’t perform that action at this time.