Skip to content

Instantly share code, notes, and snippets.

View Sakurina's full-sized avatar

Yanik Magnan Sakurina

View GitHub Profile
function runScriptsYo(doc) {
var scripts = doc.getElementsByTagName("script");
for (var i=0; i<scripts.length; i++)
eval(scripts[i].firstChild.nodeValue);
}
overlaps = From et In DataSetManager.employeTache.Rows Where _
(et IsNot ModifiableRow AndAlso modifyingDatabaseTask = False) And _
et.item("noEmploye") = noEmploye And _
((startTime >= et.item("dateDebutEmployeTache") And startTime <= et.item("dateFinEmployeTache")) OrElse _
(endTime >= et.item("dateDebutEmployeTache") And endTime <= et.item("dateFinEmployeTache")) OrElse _
(et.item("dateDebutEmployeTache") >= startTime AndAlso et.item("dateFinEmployeTache") <= endTime)) _
Select et
If (overlaps.Count > 0) Then
Return True
End If
@Sakurina
Sakurina / slaveplay.m
Created June 18, 2011 15:56
an example for @r_plus
-(void) setMasterToggle:(id)value specifier:(id)specifier {
// You'd set the "set" property for your switch in your plist to
// "setMasterToggle:specifier:" so this gets called
[self setPreferenceValue:value specifier:specifier];
BOOL boolValue = [value boolValue];
// "SlaveToggle" is the ID of the toggle that depends on this switch
PSSpecifier* slaveSpecifier = [self specifierForID:@"SlaveToggle"];
@Sakurina
Sakurina / t3_bruteforce.rb
Created October 30, 2011 16:39
a horrific attempt at brute forcing technika 3 album art URLs, could probably be greatly improved, uses repeated_permutation which requires ruby 1.9.x
require 'uri'
require 'net/http'
def url_for_songname(songname)
"http://img3.platinumcrew.co.kr/icon/disc/110/#{songname}_1.png"
end
def all_possibilities_for_this_many_characters(c)
char_seq = []
(97..122).each do |charcode| # letters
@Sakurina
Sakurina / README.markdown
Created January 31, 2012 23:47
hotaru - automagically replaces images with retina display variants

hotaru

Just add a retina-src attribute to img tags pointing to a Retina Display version of your image, load this script, and Retina Display resources will automatically get subbed in when appropriate.

License

Copyright (c) 2012 Yanik Magnan ([email protected])

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above

@Sakurina
Sakurina / open-in-4sq.bookmarklet.js
Created March 9, 2012 06:08
open a foursquare venue from a browser in the iOS app (original src + Closure Compiled bookmarklet)
javascript:(function(){var a=document.location.pathname.split("/"),b=a.length-1;if(!(0>=b)&&"v"==a["touch"==a[1]?2:1])document.location="foursquare://venue/"+a[b];})()
@Sakurina
Sakurina / README.markdown
Created March 13, 2012 21:15
seaside - quickly start torrents in transmission from your iOS devices

seaside

seaside is a script that lets you quickly start torrents on Transmission on your home computer from an iOS device. How quickly? As quickly as copying the URL to the torrent file or a magnet link to the clipboard.

Requirements

  • Transmission with the Web server enabled
  • MyScripts on your iOS device
  • You must be on the same LAN as your computer or have port forwarding and whatnot configured. Currently, this does not work with password-protected servers.
@Sakurina
Sakurina / onsen.coffee
Created June 13, 2012 05:45
onsen - opens the currently playing song for the specified niconico sound entertainment networks (Nsen) channel in the niconico douga iOS app, for MyScripts
# onsen
# API URL
channel = 'lv96524916' # nicoindies
url = "http://live.nicovideo.jp/nsendata?v=#{channel}"
# HELPERS
last = (a) -> a[a.length-1]
id_for_url = (url) -> last url.split('/')
@Sakurina
Sakurina / gist:5711702
Created June 5, 2013 04:56
SDVX II songs that have yet to materialize
ごりらがいるんだ かぼちゃがうたってみたVer. / ピノキオP feat. かぼちゃ / 160 / — / — / —
こちら、幸福安心委員会です。 / うたたP / — / — / — / 14
サリシノハラ / みきとP feat.りぶ / — / — / — / 13
サンドリヨン / Dios/シグナルP / — / — / — / 13
Antinomie (SDVX EDIT) / void(IOSYS) feat. 厚志(石鹸屋) / — / — / — / —
Keep Going! / REDALiCE feat. 野宮あゆみ / ― / ― / ― / ―
Power of Battle (SDVX EDIT) / RoughSketch vs REDALiCE feat.イザベル / ― / ― / ― / ―
Two Fates / 発熱巫女~ず / ― / ― / ― / ―
天狗の落とし文 feat.ytr / 魂音泉 / ― / ― / ― / ―
魔境堕天録サリエル / Unlucky Morpheus / — / — / — / —
@Sakurina
Sakurina / sdvx-gst.rb
Created July 16, 2013 22:34
build your own Sound Voltex soundtrack because Konami won't make one for some reason
# build your own SDVX soundtrack
# grabs all the YouTube URLs for konemi's SDVX lineouts
# and makes a shell script that downloads them and turns them to MP3s
#
# requires: youtube-dl, ffmpeg
# usage: ruby sdvx-gst.rb > sdvx-gst.sh
#
# hey konami, it's kind of dumb we can't pay you to get these songs, just sayin'
require 'rubygems'