Skip to content

Instantly share code, notes, and snippets.

mutekinootoko /
Created February 16, 2021 08:29
mac WOL
import socket
s=socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.sendto('\xff'*6+'\x70\x73\xc2\xbe\xe3\x0d'*16, ('', 80)) #mac address and ip
mutekinootoko / build.gradle
Last active August 21, 2019 05:43
simple jar build gradle build file
* This file was generated by the Gradle 'init' task.
* This is a general purpose Gradle build.
* Learn how to create Gradle builds at
apply plugin: 'java'
apply plugin: 'eclipse'
:set list
:set listchars=tab:>-
# tab size =4
:set tabstop=4
mutekinootoko /
Last active May 17, 2017 15:00 — forked from JeffPaine/
Make an issue on github using API V3 and Python
import json
import requests
# Authentication for user filing issue (must have read/write access to
# repository to add issue to)
# The repository to add this issue to
"author":"Marku L",
"text":["Marku L",
"bah bnah blah blah blah ",
mutekinootoko / gist:43d08e88aa4c11c558f6afc57a55f177
Created February 7, 2017 09:49
Diff, show modified line from right file only
diff --unchanged-line-format= --old-line-format= --new-line-format='%L' FILE_A FILE_B
mutekinootoko /
Created January 2, 2017 09:26
save history from python interpreter
import readline
mutekinootoko /
Last active October 31, 2016 07:52
n-gram tokenizer lucene 6
ArrayList<String> grams = new ArrayList<>();
FileReader fr = new FileReader(args[0]);
System.out.println("loading content file: " + args[0]);
BufferedReader br = new BufferedReader(fr);
mutekinootoko /
Created October 31, 2016 05:14 — forked from qrtt1/
複習 Lucene 的用法 (6.x)
import static org.junit.Assert.assertEquals;
import org.apache.log4j.Logger;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.cjk.CJKAnalyzer;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field.Store;
import org.apache.lucene.document.TextField;
mutekinootoko / createCustomViewFromXib.m
Created July 2, 2016 10:51
create a custom uiview from a xib
UINib *nib = [UINib nibWithNibName:@"YourCustomView" bundle:nil];
YourCustomView *view = [[nib instantiateWithOwner:self options:nil] objectAtIndex:0];
[superview addSubview:view];