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 / NewResetSetup
Last active November 4, 2024 03:11
MacOS defaults
# dock hide and hover delays
defaults write com.apple.WindowManager AutoHideDelay -float 0.25
defaults write com.apple.dock autohide-delay -float 0.25
killall Dock
# list view default
defaults write com.apple.finder "FXPreferredViewStyle" -string "Nlsv"
killall Finder
# Save to disk (not to iCloud) by default
@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
@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 / 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 / [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 / 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 / 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 / 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 / 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 / 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)