Skip to content

Instantly share code, notes, and snippets.

View RobbiNespu's full-sized avatar
:octocat:
Wut?

Robbi Nespu RobbiNespu

:octocat:
Wut?
View GitHub Profile
{
"type": [
"h-entry"
],
"properties": {
"summary": [
"Want to read: Bergaji dan pokai by Suraya Zainudin, ISBN: 9789672459552"
],
@RobbiNespu
RobbiNespu / sp_KillDeadlocks.sql
Created December 27, 2023 22:15
MSSQL store procedure - kill deadlock
USE YourDatabaseName; -- Replace 'YourDatabaseName' with your actual database name
CREATE PROCEDURE sp_KillDeadlocks
AS
BEGIN
SET NOCOUNT ON;
DECLARE @deadlockID INT;
-- Create a temporary table to store deadlock information
Release notes of 5.15.2 (18096)
Resolved Issues
-Minor bug fixes
-Security enhancements
Release notes of 5.15.1 (17948)
Resolved Issues
-Minor bug fixes
Release notes of 5.15.0 (17890)
@RobbiNespu
RobbiNespu / Move TempDB.sql
Created May 26, 2023 04:02 — forked from FlogDonkey/Move TempDB.sql
Moves SQL TempDB files to designated location, and sizes them appropriately. If there are multiple instances hosted on the same SQL Server, divide the drive size by the instance count, and create folders for each instance name on the destination drive.
/*
Snippet is nuts and bolts for creating/moving to an isolated tempdb drive.
After you run this, SQL Server must be restarted for it to take effect
*/
DECLARE @DriveSizeGB INT = 40
,@FileCount INT = 9
,@RowID INT
,@FileSize VARCHAR(10)
,@DrivePath VARCHAR(100) = 'T:\' + @@SERVICENAME + '\';
@RobbiNespu
RobbiNespu / TOS_DI-win-x86_64.ini
Created February 14, 2023 00:07
Default talend
-vmargs
-Xms512m
-Xmx1536m
-Dfile.encoding=UTF-8
-Dosgi.requiredJavaVersion=1.8
-XX:+UseG1GC
-XX:+UseStringDeduplication
-XX:MaxMetaspaceSize=512m
@RobbiNespu
RobbiNespu / find.sh
Created December 26, 2022 14:01
Posix - Speed up "find" + "exec" command (recursive)
# let see how many files we have
$ find . -type f | wc -l
36367
# lets check every file status
$ time find . -type f -exec stat {} \; > /dev/null
real 0m40.107s
user 0m14.381s
sys 0m26.410s
@RobbiNespu
RobbiNespu / QuizPage.kotlin
Created December 19, 2022 08:58
multi choice quiz
class QuizPage extends StatefulWidget {
@override
_QuizPageState createState() => _QuizPageState();
}
class _QuizPageState extends State<QuizPage> {
int _currentQuestionIndex = 0;
List<QuizQuestion> _questions = [ QuizQuestion( question: 'What is the capital of France?', answers: ['Paris', 'London', 'New York', 'Tokyo'],
correctAnswer: 'Paris',
),
@RobbiNespu
RobbiNespu / SimpleTimer.cpp
Created November 18, 2022 12:16
SimpleTimer
/*
* SimpleTimer.cpp
*
* SimpleTimer - A timer library for Arduino.
* Author: mromani@ottotecnica.com
* Copyright (c) 2010 OTTOTECNICA Italy
*
* This library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Lesser
* General Public License as published by the Free Software
@RobbiNespu
RobbiNespu / Smart HTTP Git and CGIT on Nginx server with Auth on push
Created November 18, 2022 03:07 — forked from rtkay123/Smart HTTP Git and CGIT on Nginx server with Auth on push
Installing Git and Cgit to Debian NGINX server (with smart http and authentication on push)
# Just some notes on enabling smart http with nginx as well as authentication on push for repos
# install git, cgit and apache2-utils (for authentication)
apt install git cgit apache2-utils fcgiwrap
# create a git user
adduser git
su git
cd
mkdir .ssh && chmod 700 .ssh
touch .ssh/authorized_keys && chmod 600 .ssh/authorized_keys
NCC(JOHOR) 2 & 3 NOV 2022, RABU & KHAMIS (SESI BAHASA MELAYU)
==============================================================
DAY 1
-------
Paper 1: Overview of The Property Market
Paper 2: The Act & Rules