Skip to content

Instantly share code, notes, and snippets.

Sub GetLatestScriptoriumPosts()
Dim i As Integer
Dim sURL As String, sHTML As String, sAllPosts As String
Dim oHttp As Object
Dim lTopicstart As Long, lTopicend As Long
Dim blWSExists As Boolean
'Create a new Worksheet "Latest Scriptorium Posts" if it doesnt'exist already.
For i = 1 To Worksheets.Count
If Worksheets(i).Name = "Latest Scriptorium Posts" Then
@kubrick06010
kubrick06010 / vlc-avcapture.sh
Last active November 24, 2022 14:14
redirect isight stream to vlc using avcapture OSX
/Applications/VLC.app/Contents/MacOS/vlc avcapture:// -vvv input_stream --sout='#duplicate{dst=display, dst="transcode{venc=x264{keyint=60,idrint=2},vcodec=h264,vb=300,acodec=mp4a,ab=3 2,channels=2, samplerate=22050}:rtp{dst=127.0.0.1,port=1234,sdp=file:////vlc.sdp}"}'
@kubrick06010
kubrick06010 / sap_rfc_conn.bas
Created February 16, 2012 02:45
read tables via SAP RFC connection
'Para iniciar la conexion debes añadir las referencias activex (ficheros .ocx) que correspondan
Dim objFileSystemObject As Object
Dim ctlLogon As Object
Dim ctlTableFactory As Object
Dim objWindowsScriptShell As Object
Dim objConnection As Object
Dim conn As Object
Set objFileSystemObject = CreateObject("Scripting.FileSystemObject")
@kubrick06010
kubrick06010 / addsheets.bas
Created February 16, 2012 23:53
snippets for excel and VBA
Sub AddWorksheet()
Worksheets.Add().Name = "MySheet"
End Sub
Sub AddAsLastWorksheet()
@kubrick06010
kubrick06010 / toalla.scpt
Last active March 27, 2022 13:46
toalla for textual
-- Dalboz 2011
-- Toalla for Textual IRC Client Mac serás sodomizado
on textualcmd(nick1)
set chopea to words of nick1
set nick2 to item 1 of chopea
-- set repetir to item 2 of chopea
use Net::Twitter;
$nt = Net::Twitter->new(
traits => ['API::REST', 'RetryOnError']
max_retries => 3,
);
use Net::Twitter;
my $nt = Net::Twitter->new(
traits => [qw/API::REST RateLimit/],
%other_options,
@kubrick06010
kubrick06010 / 1.pl
Created July 9, 2012 17:25
Perl Win32::OLE Automation for Lotus Notes
use strict;
use warnings;
use diagnostics;
use Win32::OLE;
my $Notes = Win32::OLE->new('Notes.NotesSession')or die "$!: cannot st
+art Lotus Notes Session object.\n";
my ($Version) = ($Notes->{NotesVersion} =~ /\s*(.*\S)\s*$/);
print "The current user is $Notes->{UserName}.\n";
@kubrick06010
kubrick06010 / 1.pl
Created July 9, 2012 17:31
Perl Win32::OLE Automation for Excel
#From http://www.xav.com/perl/faq/Windows/ActivePerl-Winfaq12.html
#How do I extract a series of cells from Microsoft Excel?
#If you have a sheet object you can extract the values of a series of cells through $Sheet->Range-> #{'Value'}, for example:
my $array = $Sheet->Range("A8:B9")->{'Value'};
#Now $array[0][0] contains the value of cell A8, $array[0][1] the value of cell B8, $array[1][0] the value #of cell A9 and $array[1][1] the value of cell B9.
@kubrick06010
kubrick06010 / inv-val-funcs.bas
Last active March 1, 2024 19:07
Inventory valuation models
Function LIFO(dataRange As Range) As Variant
Dim data As Variant
Dim result() As Variant
Dim cumIn As Double
Dim cumOut As Double
Dim cost As Double
Dim i As Long
' Convert input range to a variant array
data = dataRange.Value
@kubrick06010
kubrick06010 / TweetWSH.wsf
Created September 20, 2012 20:00
twitter for windows cmd
<job>
<script language="vbscript">
' Twitter bot with OAuth in WSH
' for Windows and windows scripting host
' tweets with OAuth
'
' All thanks to: http://scottdesapio.com/VBScriptOAuth/ and http://classicaspreference.com/aspexamples/classic_asp_for_twitter_desapio.asp
' pasted together by piskec, 2010, http://www.krtina.com/blog
' ********************************