This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import lxml.html | |
import sys | |
def getText(element): | |
# this space is Zenkaku-space | |
return element.text_content().encode('utf-8').strip().replace(' ','') | |
# localpages html (weighttable1x.html) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo $(cd $(dirname ${1}) && pwd)/$(basename ${1}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# usage 長時間かかるスクリプトの最後に echo 'finish' | slack_notify $0とか | |
set -eu | |
#Incoming WebHooksのURL | |
WEBHOOKURL="ここにIncoming Webhooks IntegrationのURLをいれてね" | |
#メッセージを保存する一時ファイル | |
#mktempで名前つけた時.Xの数が足りないと怒られたから適当につけた | |
MESSAGEFILE=$(mktemp -t webhooks.XXXXX) | |
trap " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ $1 -eq 0 ]; then | |
defaults write com.apple.screencapture disable-shadow -boolean true | |
else | |
defaults write com.apple.screencapture disable-shadow -boolean false | |
fi | |
killall SystemUIServer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef struct | |
{ | |
double **foo; | |
} HOGE; | |
void mem_alc(HOGE* hoge) | |
{ | |
hoge->foo = new double*[5]; | |
for (int i = 0; i < 5; ++i) | |
hoge->foo[i] = new double[5]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
void modify(int** bar) { | |
int i,j; | |
for(i=0;i<4;i++) | |
for(j=0;j<3;j++) | |
bar[i][j] = 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
: || echo '1st: 見えない' && { | |
echo '1st_inner: 見える' | |
} | |
: && echo '2nd: 見える' && { | |
echo '2nd_inner: 見える' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
NUM=`cat ~/.myapp/alg_getter` | |
wget ページのURL/alg16${NUM}.pdf | |
if [ ! $? -eq 0 ]; then | |
exit | |
fi | |
# qpdfくんが有能 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#------------------------------------------------- | |
# | |
# Project created by QtCreator 2016-11-02T15:59:39 | |
# | |
#------------------------------------------------- | |
QT += core gui | |
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import itertools | |
import sys | |
COLUMN = [ | |
'Alfa', 'Bravo', 'Charlie', 'Delta', 'Echo', 'Foxtrot', | |
'Golf', 'Hotel', 'India', 'Juliet', 'Kilo', 'Lima', | |
'Mike', 'November', 'Oscar', 'Papa', 'Quebec', 'Romeo', | |
'Sierra', 'Tango', 'Uniform', 'Victor', 'Whiskey', | |
'X-ray', 'Yankee', 'Zulu' |
OlderNewer