Skip to content

Instantly share code, notes, and snippets.

View rscoopcur's full-sized avatar

Richard Scoop rscoopcur

  • Cursoft Development & Consultancy NV
  • Willemstad, Curaçao, Dutch Caribbean
  • X @rascoop
View GitHub Profile
@rscoopcur
rscoopcur / contemplative-llms.txt
Created January 8, 2025 11:21 — forked from Maharshi-Pandya/contemplative-llms.txt
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference
@rscoopcur
rscoopcur / Popover.vue
Created March 11, 2024 18:51 — forked from jannunen/Popover.vue
How to create Popover component (Vue3, script setup and BS5)
<template>
<slot />
</template>
<script setup>
import { Popover } from 'bootstrap'
import { onMounted } from 'vue'
import { useSlots } from 'vue';
const slots = useSlots();
const props = defineProps({
@rscoopcur
rscoopcur / app.js
Created March 5, 2024 19:29 — forked from jacobshenning/app.js
An alpine datatable
// Alpine JS datatable
window.datatable = function (data) {
return {
source: data,
data: data,
// Pagination
current_page: 0,
items_per_page_value: 5,
ffmpeg -i input.mp4 -b:v 0 -crf 30 -pass 1 -an -f webm -y
ffmpeg: This is the command itself, calling the FFmpeg executable.
-i input.mp4: This specifies the input file, which is a video file named "input.mp4".
-b:v 0: This sets the video bitrate to 0, indicating that it should be automatically determined by the codec.
-crf 30: This sets the Constant Rate Factor (CRF) value to 30. CRF is a quality control setting for video encoding. Lower values generally result in higher quality but larger files, while higher values produce smaller files with lower quality. A value of 30 is considered to be on the lower end of quality.
-pass 1: This indicates that the encoding process will use a two-pass encoding method. The current command represents the first pass, which analyzes the video and generates a log file for the second pass to use for more efficient compression.
-an: This flag disables audio in the output file, meaning the resulting file will have no audio.
-f webm: This specifies the output format, which i
@rscoopcur
rscoopcur / JSON_to_URLEncoded.js
Created September 26, 2022 12:44 — forked from lastguest/JSON_to_URLEncoded.js
Convert JavaScript object to x-www-form-urlencoded format - works really well for JSON to Wordpress
function JSON_to_URLEncoded(element,key,list){
var list = list || [];
if(typeof(element)=='object'){
for (var idx in element)
JSON_to_URLEncoded(element[idx],key?key+'['+idx+']':idx,list);
} else {
list.push(key+'='+encodeURIComponent(element));
}
return list.join('&');
}
@rscoopcur
rscoopcur / Startup.cs
Created August 31, 2022 16:55 — forked from rascoop/Startup.cs
OWIN Startup class to use AAD.
using Owin;
namespace WindowsAuthAppToAADDemo
{
public partial class Startup
{
public void Configuration(IAppBuilder app)
{
ConfigureAuth(app);
}
@rscoopcur
rscoopcur / NPOIHelper.cs
Last active July 6, 2022 15:03 — forked from Sunhelter/NPOIHelper.cs
NPOIHelper.cs
using System;
using System.Collections.Generic;
using System.Web;
using System.IO;
using System.Text;
using System.Data;
using NPOI;
using NPOI.HPSF;
using NPOI.HSSF;
using NPOI.HSSF.UserModel;
  1. Find the Address of the folder you want to be synced. (ie. G:\Games\). Copy it.
  2. Find the OneDrive location you wish for it to sync to. Hold shift and right click. On the context menu, click open command window here.
  3. In the command window type mklink /j "YourCustomFolderName" G:\Games\ (G:\Games\ is the address of your original folder).

This is like a shortcut that tells any programs that look there to look at another directory. This will sync anything inside the address you tell it to the folder created in a onedrive directory

  1. open cmd box in admin mode
  2. cd /users/<username>/OneDrive
  3. make a link like this: mklink /J <name of folder> <name of folder to sync>
-- Script to copy entire database in MS SQL Server
-- (Source: https://stackoverflow.com/a/79691/826308)
-- VARIABLES
DECLARE @dbSrcName as nvarchar(max) = 'Northwind';
DECLARE @dbCopyName as nvarchar(max) = 'Northwind_20211026';
DECLARE @dbCopyFilesPath as nvarchar(max) = 'E:\\Backups\\';
-- (change if needed)
DECLARE @dbSrcLogicalName as nvarchar(max) = @dbSrcName;
DECLARE @dbSrcLogicalLogName as nvarchar(max) = @dbSrcName + '_log';
// This file is based on the code from the ASP.NET Core repository
// https://github.com/aspnet/AspNetCore/tree/master/src/Middleware/SpaServices.Extensions/src
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Net;