Skip to content

Instantly share code, notes, and snippets.

@webprogramozo
webprogramozo / init.c
Created May 7, 2024 22:12 — forked from wrdg/init.c
Customizable spawn loadouts for regular and donator players; changes/additions to init.c
//* Script: Customizable spawn loadouts for regular and donator players
//* Author: Wardog
//* Donate: https://wrdg.net/donate
//*
//* Notes: Creates a directory in the Server Profile folder called SpawnLoadout. You can change these files in
//* in real time, without restarting the server to take effect.
//*
//* ./SpawnLoadout/CommonItems.txt = items spawned between both donators and regulars
//* ./SpawnLoadout/Regular.txt = loadout for regular players
//* ./SpawnLoadout/Donators/STEAMIDHERE.txt = directory where steam id files go for donators; loadouts for donators

SSH keypair setup for GitHub (or GitHub/GitLab/BitBucket, etc, etc)

Create a repo.

Make sure there is at least one file in it (even just the README.md)

Generate a SSH key pair (private/public):

ssh-keygen -t rsa -C "[email protected]"
@webprogramozo
webprogramozo / border_radius_helper.scss
Created November 2, 2022 10:46
Some mixins to help customize border radius inside SCSS
@use "sass:map";
$border-radius-default-value: 0.625rem!default;
$border-radius-top-left-value: $border-radius-default-value!default;
$border-radius-top-right-value: $border-radius-default-value!default;
$border-radius-bottom-left-value: $border-radius-default-value!default;
$border-radius-bottom-right-value: $border-radius-default-value!default;
$border-radius: (
top-left: $border-radius-top-left-value,
top-right: $border-radius-top-right-value,
@webprogramozo
webprogramozo / asyncer_draft.js
Created September 25, 2022 12:23
Some async functionality with a class-based approach
const Asyncer = (function(){
function asyncWorkerRunner(worker){
if(worker.result.isWaiting()){
worker.result.setPending();
try{
worker.workerFunction(function(resultData){
worker.result.setSuccessResult(resultData);
}, );
}catch(exceptionData){
worker.result.setErrorResult(exceptionData);
@webprogramozo
webprogramozo / tesco_online_menu_highlighter.js
Last active September 25, 2022 11:52
Auto-highlight the current main- and subcategory on Tesco Online website's main menu
const $fe = function(selector, callable){[].forEach.call(document.querySelectorAll(selector),callable);};
const $fei = function(selector, callable, interval){setInterval(function(){$fe(selector, callable);}, interval);};
const breadcumbSelector = '.beans-breadcrumb__list-item a[href] span.beans-link__text';
$fei(
breadcumbSelector, function(spanLinkItem){
const parentHref = spanLinkItem.parentElement.getAttribute('href');
const finalHref = parentHref.slice(0,-4) + "?include-children=true";
const finalSelector = `li.menu__item a[href='${finalHref}']`;
const formatClass = 'bandi-highlight';
const item = document.querySelector(finalSelector);
@webprogramozo
webprogramozo / integrathor.c
Last active August 2, 2022 09:49
IntegraThor - command line definite integral calculator (oldie school project from 2014)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
int getline(char *s, int n){
int c;
char *t=s;
while(n-- > 0 && (c=getchar())!=EOF && c!='\n') *t++ = c;
*t='\0';
@webprogramozo
webprogramozo / javascriptclass.js
Last active December 20, 2020 23:03 — forked from somahargitai/javascriptclass.js
Read this.baseURL
const async = require('async');
class demoClass {
constructor(con) {
this.constantVariable = con;
const that = this;
this.q = async.queue(function(input, cb){
that.processFunc(input, cb);
//vagy that.processFunc.apply(that, arguments);
}, 1);
@webprogramozo
webprogramozo / debug_backtrace.php
Created December 1, 2018 14:03
Modifying array items within debug backtrace
<?php
set_error_handler(function(){
$backtrace = debug_backtrace(0);
$backtrace[2]["args"][0][0] = 7;
$backtrace[2]["args"][0][1] = 5;
$backtrace[2]["args"][0][2] = 3;
});
$test = [4,3,2];
@webprogramozo
webprogramozo / blur-bs3-bs4.css
Last active October 5, 2024 13:48
Bootstrap modal with blurry background (Bootstrap 3,4,5)
/* Compatible with Bootstrap 3 and 4 */
body.modal-open > :not(.modal) {
-webkit-filter: blur(1px);
-moz-filter: blur(1px);
-o-filter: blur(1px);
-ms-filter: blur(1px);
filter: blur(1px);
}