Skip to content

Instantly share code, notes, and snippets.

Sub findCell2RowCopy()
Dim findString As Variant
Dim firstAddress As String
Dim findResultCell As Range
Dim oldSheet As Worksheet
Dim destinationSheet As Worksheet
Dim destinationRowNumber As Long
Set oldSheet = activeSheet
destinationRowNumber = 1
@r-plus
r-plus / create.ps1
Created January 30, 2014 08:50
create files for mtime execution handling test on windows.
# make many directories
cd ~\test
for ($i=0; $i -lt 100; $i++) {
New-Item $i\00 -type directory | Out-Null
New-Item $i\99 -type directory | Out-Null
}
# create files and tweak modify-date if file number is even.
function CreateNewFiles($path)
{
REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00
// Contributor: Thanks wakinchan's work to compatible for GoogleTranslate v2.0
// https://github.com/wakinchan/GoogleTranslateScheme
#define kNewURLScheme "googletranslate://tweak?q="
@interface TextTranslator : NSObject <UIApplicationDelegate>
- (id)initWithDelegate:(id)delegate userInfo:(id)info translateText:(id)text fromLanguage:(id)language toLanguage:(id)language5 localeLanguage:(id)language6 inputMethod:(int)method;
- (void)start;
@end
@r-plus
r-plus / sendmail_log_analyze.py
Last active July 7, 2016 10:57
Generate To address list per relay server from sendmail log files.
#!/usr/bin/env python
#
# Require python 2.5 or higher
#
# Usage:
# script.py <maillog> [maillog]...
import re
from os import mkdir
from sys import argv
@r-plus
r-plus / theos_install_kill.patch
Created May 21, 2013 14:29
THEOS_INSTALL_KILL patch.
diff --git a/makefiles/master/tweak.mk b/makefiles/master/tweak.mk
index 9b0025a..eaf67c0 100644
--- a/makefiles/master/tweak.mk
+++ b/makefiles/master/tweak.mk
@@ -4,6 +4,10 @@ ifeq ($(_THEOS_RULES_LOADED),)
include $(THEOS_MAKE_PATH)/rules.mk
endif
+ifeq ($(THEOS_INSTALL_KILL),)
+ THEOS_INSTALL_KILL:=SpringBoard
debugfs -R 'stat /root/test' /dev/mapper/vg01-lv02
@r-plus
r-plus / OpenCloudTabs+.xm
Last active December 16, 2015 01:19
OpenSource version of CloudTabs+. Licensed under the GPLv3.
#import <UIKit/UIKit.h>
static BOOL isActivatingFromLongPress;
%hook BrowserToolbar
- (void)_installGestureRecognizers
{
%orig;
id bookmarkButton = MSHookIvar<id>(self, "_bookmarksItem");
UILongPressGestureRecognizer *longGesture = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longPressBookmarkButton:)];
@r-plus
r-plus / button.mm
Last active December 15, 2015 19:29
button or view?
UIButton *baseView = [[UIButton alloc] initWithFrame:self.frame];
baseView.backgroundColor = [UIColor colorWithWhite:0.0 alpha:0.3];
[baseView addTarget:self action:@selector(dismissActionSheet) forControlEvents:UIControlEventTouchUpInside];
@r-plus
r-plus / gz2xz.sh
Created March 27, 2013 10:00
カレントディレクトリ以下のgzをxzに圧縮しなおす
#!/bin/sh
FILES=$(find $(pwd) -name "*.gz" -and ! -name "*.tar.gz")
for FILE in $FILES; do
(gunzip -c $FILE | xz > ${FILE%.*}.xz; [ $? -eq 0 ] && rm -f $FILE) &
done
wait