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 (location.href.match(/michinoeki-mania\.com\/entry/)) { // Replace this with your blog domain | |
var j=new Date(); | |
var f=j.getTime(); | |
var g=""; | |
switch (f%5) { | |
case 0: | |
g="Something 1"; | |
break; | |
case 1: | |
g="Something 2"; |
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
$(document).ready(function(){ | |
// 見出しタグにclass追加 | |
$(".entry-content h1").addClass("content-h"); | |
$(".entry-content h2").addClass("content-h"); | |
$(".entry-content h3").addClass("content-h"); | |
$(".entry-content h4").addClass("content-h"); | |
$(".entry-content h5").addClass("content-h"); | |
// 「目次」表示 |
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
.entry-comment { | |
border: solid 3px #000; | |
border-radius: 10px; | |
margin: 20px 0px 10px 0px; | |
padding: 10px 10px 5px 10px; | |
} | |
p.comment-user-name { | |
z-index: 999; | |
margin-top:-30px; |
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
var icon = 'https://path-to-icon'; | |
var hatenaid = 'michimani'; | |
var toc = 200; | |
var tos = 900; | |
var p = document.getElementsByClassName('profile-icon'); | |
for (var n = 0; n < p.length; n++){ | |
p[n].src = icon; | |
} | |
window.onload = function(){ | |
setTimeout(function(){ |
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
<?php | |
$fpath = $argv[1]; | |
$o = new Bg(); | |
$o->setBgColor($fpath); | |
class Bg | |
{ |
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
<?php | |
if (count($argv) < 2) | |
{ | |
echo 'parameter not enough.'."\n"; | |
return false; | |
} | |
exec('which cowsay 2>&1', $cmd_t); | |
if (!isset($cmd_t[0]) || $cmd_t[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
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \1/' | |
} | |
function promps { | |
local BLUE="\[\e[34m\]" | |
local RED="\[\e[31m\]" | |
local GREEN="\[\e[32m\]" | |
local WHITE="\[\e[00m\]" | |
local GRAY="\[\e[37m\]" | |
local MAGENTA="\[\e[35m\]" |
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
################################################################################### | |
# check process aliving (count process number) | |
# return integer 1 (process is running) or 0 (process is dead) or 9 (some error) | |
################################################################################### | |
function is_process_alive() { | |
count=`ps awux | grep -v grep | grep -v "$0" | grep -w "$1" | wc -l` | |
if [[ $count =~ ^[0-9]+$ ]]; then | |
if [ $count != 0 ]; then | |
echo 1 | |
else |
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
import boto3 | |
import json | |
import logging | |
import os | |
from base64 import b64decode | |
from urllib.error import URLError, HTTPError | |
from urllib.request import Request, urlopen | |
SLACK_CHANNEL = os.environ['slackChannel'] |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Textbox Overlay Style by White Space</title> | |
<style type="text/css"> | |
#overlay-sample { | |
margin: 30px; | |
font-family: inherit; | |
} |
OlderNewer