Skip to content

Instantly share code, notes, and snippets.

View Laicure's full-sized avatar
🎲
int+luk

Laicurè Leviarè Laicure

🎲
int+luk
View GitHub Profile
@Laicure
Laicure / Encryptor.vb
Last active October 12, 2016 22:36
[vb] RijndaelManaged Snippet
Imports System.Security.Cryptography
Imports System.Text
Module Encryptor
'********** Cryptography Declarations
Private cipherX As New RijndaelManaged
'Keys can be 1~255, separated by a comma
'keyBytes have 32 non-duplicating values
Private keyBytes As Byte() = {}
'IVBytes have 16 non-duplicating values
@Laicure
Laicure / Extra.vb
Last active July 27, 2017 17:31
[vb] Extra Snippets
Imports System.Net.Sockets
Module Extra
#Region "DoubleBuffered Buff // Use Buff.DoubleBuff(<Control>)"
Friend NotInheritable Class Buff
Friend Shared Sub DoubleBuff(Contt As Control)
Dim ConttType As Type = Contt.[GetType]()
Dim propInfo As System.Reflection.PropertyInfo = ConttType.GetProperty("DoubleBuffered", System.Reflection.BindingFlags.Instance Or System.Reflection.BindingFlags.NonPublic)
propInfo.SetValue(Contt, True, Nothing)
@Laicure
Laicure / FormDrag.vb
Last active January 26, 2016 15:03
[vb] Form Drag Snippet
Module FormDrag
'********** Form Set Variables
Private dragging As Boolean
Private mXx As Integer
Private mYy As Integer
'Form Drag
''MouseDown
Friend Sub FormDragDown()
dragging = True
@Laicure
Laicure / SQLClient.vb
Last active March 3, 2017 21:44
[vb] SQLClient Snippets
Imports System.Data.SqlClient
Module SQLClient
'********** SQL Declarations
'Friend stringCon As String = "Integrated Security=SSPI; Data Source=???; Initial Catalog=???"
'Friend stringCon As String = "Integrated Security=False; Data Source=???; Initial Catalog=???; User ID=???; Password=???"
'Friend stringCon As String = ""
#Region "SQL Query Reader"
Friend Function SQLReadQuery(ByVal queryX As String, ByVal timeXout As Integer, connection As String) As DataTable
@Laicure
Laicure / StringManipulate.vb
Last active February 3, 2016 15:27
[vb] String Manipulator Snippets
Imports System.Text
Module StringManipulate
#Region "Code Generator"
Public Function CodeGen(sizer As Integer, customString As String) As String
Dim charX As String = IIf(String.IsNullOrWhiteSpace(customString), "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz", customString).ToString
Dim Rand As New Random
Dim BuildMe As New StringBuilder
Dim idx, CodeSize, charXsize As Integer
charXsize = charX.Length
@Laicure
Laicure / StreamWritetoCSV.vb
Created December 15, 2016 18:13
Late Bind Export to CSV
#Region "Excel Export (StreamWriter; CSV file)"
'www.codeproject.com/Articles/26303/Export-Data-to-ex-Much-Faster
Friend Sub CreateExcelX(ByVal FilePath As String, ByVal datatabler As Data.DataTable)
Dim writer As New IO.StreamWriter(FilePath)
Dim dRow As Data.DataRow = Nothing
Dim str As String = String.Empty
For i As Integer = 0 To datatabler.Columns.Count - 1
str += datatabler.Columns.Item(i).Caption & ","
Next
@Laicure
Laicure / [SQL] Rebuild ReOrganize
Last active February 16, 2017 23:15
Auto Rebuild/ReOrganize by Fragmentation Size thing :/
set nocount on
--Values to Tempo
SELECT
ind.index_id as 'IDx',
OBJECT_NAME(ind.OBJECT_ID) AS [Table],
ind.name AS [Index],
indexstats.index_type_desc AS [Type],
indexstats.avg_fragmentation_in_percent as [Frag]
into #Tempoo
@Laicure
Laicure / LateBindExcel.vb
Last active October 4, 2019 07:47
Late Binding for Excel (Winforms)
Option Strict Off
Module UnModulatedX
#Region "Export To Excel"
Friend Sub Exporter(ByVal ExportName As String, dtFirst As DataTable, dtSecond As DataTable, firstSheetName As String, sencondSheetName As String)
'init
Dim excel As Object = CreateObject("Excel.Application")
Dim wBook As New Object
Dim wSheet As New Object
@Laicure
Laicure / RedditCorn.txt
Last active September 1, 2022 01:25
Forn
https://www.reddit.com/r/3DPorncraft
https://www.reddit.com/r/60fpsporn
https://www.reddit.com/r/8muses
https://www.reddit.com/r/aa_cups
https://www.reddit.com/r/aa_cupsxxx
https://www.reddit.com/r/AbbyWinters
https://www.reddit.com/r/ABDL
https://www.reddit.com/r/AbellaAnderson
https://www.reddit.com/r/AbusePorn2
https://www.reddit.com/r/accidentalnudity
@Laicure
Laicure / New Windows Setup.bat
Last active July 21, 2024 17:31
Disable several things from Windows 10/11 for new installations
echo off
cls
rem echo --- Hibernate OFF
rem powercfg -h off
echo --- Delete: DiagTrack
sc delete DiagTrack
echo --- Delete: dmwappushservice
sc delete dmwappushservice
echo --- Manual: CryptSvc
sc config CryptSvc start=demand