Skip to content

Instantly share code, notes, and snippets.

View rinsuki's full-sized avatar

rinsuki rinsuki

View GitHub Profile
@rinsuki
rinsuki / notify.js
Last active January 4, 2016 07:39
twicliでnotifyをブラウザのNotificationにするやつ
setTimeout(function(){
function(notify){
new Notification(notify);
}
},5000);
nodisp(1,document.getElementById("fc2_bottom_bnr"));
nodisp(0,document.getElementById("fc2_ad_box"));
nodisp(1,document.getElementById("fc2_qr_code_header"));
nodisp(1,document.getElementById("fc2_footer"));
var d = document.createElement("script");
d.innerHTML="window.addEventListener('load',function(){setTimeout(function(){document.getElementById('fc2_web_header_ad_close').click();},500);})";
document.body.appendChild(d);
function nodisp(f,dom){
if(!dom) return;
dom.style.display="none";
require "rest_client"
require "json"
require "nokogiri"
class Misskey
attr_accessor :cookie,:csrftoken
def initialize(user,pass)
doc = Nokogiri::HTML(res = RestClient.get("https://misskey.xyz/",{:cookies => @cookie}))
@cookie = res.cookies
@csrftoken = doc.css("/html/head/meta[@name='csrf_token']/@content").to_s
<html>
<head>
<meta charset="UTF-8">
<title>transition Test</title>
<style>
.a{
transition:all 0.5s;
}
.a:hover{
transition:all 0s;
#include <stdio.h>
int main(){
int i,fizz,buzz;
for(i=1;i<=100;i++){
fizz = i%3 == 0;
buzz = i%5 == 0;
if(fizz && buzz)
printf("fizz buzz");
else if(fizz)
@rinsuki
rinsuki / call-yql.js
Created February 12, 2016 17:11
YQLを呼び出すやつ
/* this code is WTFPL */
function yql(q,c){
var n='yql_'+Date.now();
(new Function('window.'+n+'=arguments[0];'))(c);
var s=document.createElement('script');
s.src="http://query.yahooapis.com/v1/public/yql?callback=window."+n+"&q="+encodeURIComponent(q);
document.body.appendChild(s);
}
int main(){
while(1)
printf("🍣🍺\n");
}
-->>>野獣先輩<<<--
#!python2
# coding: utf-8
import PIL.Image
import os
import hashlib
from PyQt4.QtCore import *
from PyQt4.QtGui import *
filename=""
def main():
global filename
#!/usr/bin/python2
# configure
slack_api_token="PLEASE_REPLACE_YOUR_SLACK_BOT_API_TOKEN"
slack_channel="update-notify"
server_name="main vm"
import os
os.system("echo n | LANG=C pacman -Syu > /tmp/pacman-result.txt 2> /dev/null")
import requests
fp = open("/tmp/pacman-result.txt","r")