Skip to content

Instantly share code, notes, and snippets.

View Sakurina's full-sized avatar

Yanik Magnan Sakurina

View GitHub Profile
@Sakurina
Sakurina / riewo.cy
Created August 3, 2010 04:36
converts Icons/-style iPhone 4 themes to Bundles/-style using naming info from CSV
#!/usr/bin/env cycript
/* FileUtils */
function mv(old, _new) {
[[NSFileManager defaultManager] moveItemAtPath:old toPath:_new error:nil];
}
function mkdir(path) {
[[NSFileManager defaultManager] createDirectoryAtPath:path withIntermediateDirectories:YES attributes:nil error:nil];
}
function fileExists(path) {
@Sakurina
Sakurina / multifader.cy
Created August 10, 2010 01:35
fades out apps that support multitasking so you can get rid of those who don't
/*
* multifader - fades out apps that support multitasking so you can get rid of those who don't
* an experiment by Yanik Magnan - http://r-ch.net
*/
for each (i in [[[SBIconModel sharedInstance] applicationIcons] allObjects]) {
if ([[i.application.bundle.infoDictionary objectForKey:"DTSDKName"] hasPrefix:@"iphoneos4"])
[i setAlpha:0.1];
}
@Sakurina
Sakurina / fuckoracle-banner.sql
Created August 31, 2010 14:04
fuckoracle-banner -- a part of the FuckOracle project
set serveroutput on;
DECLARE
TYPE ct IS REF CURSOR;
bu VARCHAR2(264) := '';
lb VARCHAR2(1000);
qs VARCHAR2(1000);
le BINARY_INTEGER;
cu ct;
CURSOR cf IS
SELECT table_name, column_name FROM user_tab_columns WHERE data_type='VARCHAR2';
@Sakurina
Sakurina / sankaku.user.js
Created September 21, 2010 18:43
work-safe sankaku complex. as if there was such a thing.
// ==UserScript==
// @name Sankaku Complex Work-Safe Edition
// @namespace http://r-ch.net
// @description Makes Sankaku Complex slightly less objectionable for work.
// @include http://www.sankakucomplex.com/*
// ==/UserScript==
var imgs = document.getElementsByTagName('img');
for (var i=0; i < imgs.length; i++) { imgs[i].style.display = "none"; }
@Sakurina
Sakurina / FCSB.mm
Created October 13, 2010 14:19
five-column springboard.
/*
* Five-Column SpringBoard (FCSB) by Yanik Magnan
* http://r-ch.net/iphone/
Copyright (c) 2008-2009, 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
copyright notice and this permission notice appear in all copies.
@Sakurina
Sakurina / jsss.js
Created October 27, 2010 15:13
jsss - party like it's 1996, stylesheets in JavaScript, Netscape Communicator 4 style.
/*
* jsss - party like it's 1996
* by Yanik Magnan - http://r-ch.net
*
* A toy implementation of sorts for Netscape's long-gone CSS
* competitor, JavaScript Stylesheets. Please don't use this
* in production code. Really.
*
* Bits of the spec[1] this more or less conforms to:
* 1 - Basic Concepts
@Sakurina
Sakurina / SimiliMustache.cs
Created November 2, 2010 19:12
SimiliMustache - looks like mustache, but not as powerful
/*
Copyright (c) 2010, 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
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
@Sakurina
Sakurina / HappyHolidaysYouBastard.vb
Created December 8, 2010 20:44
handing in a project early next week? want to leave the correctors a holiday surprise? call HappyHolidays.YouBastard() on app launch, and if the date is >= 2010-12-15, they will be redirected to a YouTube video of Blink-182's Happy Holidays, You Bastard.
Imports System.Diagnostics
Public Class HappyHolidays
Private Shared a As Integer = 0
Private Shared b As Integer = 1
Private Shared c As DateTime
Private Shared d As String = ""
Private Shared e As Integer() = {0, 0, 0, 0, 0, 0, 0, 0}
Private Shared f As Integer() = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
@Sakurina
Sakurina / ICQuery.cy
Created December 28, 2010 04:59
ICQuery - helpers for working with icon lists from cycript
/*
* ICQuery - helpers for working with icon lists from cycript
* by Yanik Magnan - http://r-ch.net
*
* EXAMPLES:
* i$(0) => dictionary containing the 0th icon list model and view
* i$(ilModel) => index of that icon list model in the root folder
* i$(ilView) => index of that icon list view in the root folder
*
* WHAT ABOUT NON-ROOT FOLDERS?
@Sakurina
Sakurina / oo-plsql.sql
Created March 30, 2011 20:05
object-oriented PL/SQL for situations where PL/SQL's own object system isn't accessible (Forms)
set serveroutput on
-- create a table to test against
CREATE TABLE objects(
id NUMBER,
text VARCHAR2(255)
);
INSERT INTO objects VALUES(1, 'a');
INSERT INTO objects VALUES(2, 'b');