Skip to content

Instantly share code, notes, and snippets.

View neet's full-sized avatar

Ryō Igarashi neet

View GitHub Profile
@neet
neet / charaNames.md
Last active October 25, 2017 13:03
マギアレコード(CC BY-SA 3.0)

100番台

charaName モデル番号
環 いろは 100100
環 いろは(変身前) 100101
環 いろは(転校前) 100102
環 いろは(水着2017) 100103
環 いろは(コピー) 100109
七海 やちよ 100200
七海 やちよ(変身前) 100201
@neet
neet / script.js
Created August 15, 2017 04:59
yoroshikuonegaishimaaaasu.com killer
let el = document.getElementsByClassName("practice-keyboard__enter")[0];
let downEvent = document.createEvent("KeyboardEvent");
let upEvent = document.createEvent("KeyboardEvent");
downEvent.initKeyEvent("keydown", true, true, null, 0, 0, 0, 0, 13, 13);
upEvent.initKeyEvent("keyup", true, true, null, 0, 0, 0, 0, 13, 13);
let count = 0;
while (true) {
@neet
neet / FizzBuzz.rb
Created July 28, 2017 16:42
FizzBuzz.rb
i = 1
while i <= 100 do
if i % 3 == 0
puts "Fizz"
elsif i % 5 == 0
puts "Buzz"
elsif i % 3 == 0 and i % 5 == 0
puts "FizzBuzz"
else
@neet
neet / getSelection.js
Created July 19, 2017 16:57
getSelection.js
$(document).on('click','.text', function(e) {
var selObj = window.getSelection();
if ( !selObj.toString() ) {
//選択されていない場合の処理
}
});
@neet
neet / standard.less
Last active July 4, 2017 19:03
Atom PlatformIO IDE Terminal用less
.standard {
background-color: #282828;
color: #FF9400;
::selection {
background-color: #FF9400;
color: #202020;
}
.terminal-cursor {
api.postImage("media", formData, function (postimage) {
media_array.unshift(postimage.id);
var params = {
status : form.status_textarea.value,
sensitive : form.status_nsfw.value,
spoiler_text : form.status_spoiler.value,
visibility : form.privacy_option.value,
media_ids : media_array
}
#tester.py
import json
def splitStr(str, num):
s = ''
j = 0
l = []
for i in str:
s += i
# coding: UTF-8
from mastodon import Mastodon
my_instance = "https://mastodon.cloud"
Mastodon.create_app(
'testapp',
api_base_url = my_instance,
to_file = 'pytooter_clientcred.txt'
)
@neet
neet / functions.php
Last active June 23, 2017 03:17
WordPress Auto crate slug by translated-title
<?php
function auto_post_slug( $slug, $post_ID, $post_status, $post_type ) {
if ( preg_match( '/(%[0-9a-f]{2})+/', $slug ) ) {
$text = urlencode(get_the_title($post_ID));
$enc = "ja|en";
$html = file_get_contents("https://translate.google.com/?langpair=$enc&ie=UTF8&oe=UTF8&text=$text");
$pattern = '/" onmouseover="this.style.backgroundColor=\'#ebeff9\'" onmouseout="this.style.backgroundColor=\'#fff\'">(.*?)<\/span><\/span>/';
preg_match($pattern, $html, $matche);
$slug = str_replace(" ", "_", $matche[1]);
$slug = preg_replace(array("/&(.+?);/","/[^a-zA-Z0-9_\-]/","/_{2,}/"), "", $slug);
@neet
neet / style.css
Last active February 21, 2017 12:57
tweet-deck_glass
/*@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document url("https://tweetdeck.twitter.com/") {*/
body .app-content {
background-color: rgba(255,255,255,0.0);
}
body .app-columns-container {
background-image: url(http://www.project-imas.com/w/images/4/4a/Miku_SS_SSR2.png);