Skip to content

Instantly share code, notes, and snippets.

View CallumCarmicheal's full-sized avatar

Callum Carmicheal CallumCarmicheal

View GitHub Profile
@CallumCarmicheal
CallumCarmicheal / README.md
Last active February 25, 2026 00:05 — forked from mithicher/tom-select.blade.php
Tom Select Livewire Blade Component (Real time with changing item list)

Attributions

This is a heavily modified version of the original code by mithicher. The previous fork only worked one way so once the component was rendered the options list could not be changed.

If you have any improved versions or better approaches to this, please leave a comment and i'll add it up here. :)

Version changes / Edits

Version 1 - Add code and descriptions.

@CallumCarmicheal
CallumCarmicheal / CloudflareAPI.cs
Last active March 14, 2023 01:42
Cloudflare DNS Updating tool, Simple C# app with json configuration to update cloudflare ip's to public ip. Just create a C# .Net Framework 4.8 console app, compile then create a Task Scheduler entry.
using Newtonsoft.Json;
using RestSharp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
@CallumCarmicheal
CallumCarmicheal / MattersphereControlTooltips.cs
Created October 28, 2022 15:46
Add tooltips to all mattersphere control's, helps with DPI issues on laptops where text is cut off.
#region ToolTip Generation
ToolTip _GlobalToolTip = new ToolTip();
protected void setupToolTipLabels() {
// Loop tabs.
TabPage tp = (TabPage)EnquiryForm.Parent; //Grabs the Tab Page of the Enquiry Form
TabControl tc = (TabControl)tp.Parent;
foreach ( TabPage tbp in tc.TabPages )
_GlobalToolTip_RecursivelyLoopControls( tbp.Text, tbp );
@CallumCarmicheal
CallumCarmicheal / power-monitor.lua
Last active October 2, 2023 20:44 — forked from cybrox/power-monitor.lua
Mekanism Induction Matrix Computer Craft Stats Display
-- Power Monitor for induction matrix
--
-- Written and copyrighted 2016+
-- by Sven Marc 'cybrox' Gehring
-- Licensed under MIT license
-- Edited by Callum Carmicheal
-- to fix the API issue on 1.16.5 ATM 6 modpack
--
import { StackScreenProps } from '@react-navigation/stack';
import firebase from 'firebase';
import * as React from 'react';
import { Dimensions, FlatList, StyleProp, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import { TouchableHighlight } from 'react-native-gesture-handler';
import { IChat, IUserMeta } from '../../application/API/Messages';
import { IUser, IUserBasic } from '../../application/API/Users';
import { margin } from '../../application/StyleHelpers';
import { GetInitials, IsColourDark, StringToColor, TruncateString } from '../../application/UtilityFunctions';
@CallumCarmicheal
CallumCarmicheal / GmapClusterRendererFixedNullRef.java
Last active April 19, 2020 17:17
Fix for fragment null string comparison inside DefaultClusterRenderer Java
public class GmapClusterRendererFixedNullRef extends DefaultClusterRenderer<GmapClusterItem>
{
// ....
@Override
protected void onClusterItemUpdated(GmapClusterItem item, Marker marker)
{
//super.onClusterItemUpdated(item, marker);
/// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@CallumCarmicheal
CallumCarmicheal / HowToUse.cs
Last active March 25, 2018 18:34
Print INT's / HEX Data to the Console, this was a usefull piece of code i written for a VM to print the stack and memory easily.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
static class HowToUse {
public static void Main() {
// Our Data Set
int[] data = new int[20] {
@CallumCarmicheal
CallumCarmicheal / Expression example.cs
Last active April 13, 2017 05:05
Expression example for a lexor
List<string> GetGrath() {
Expression current_operation = null;
List<string> nodeString = new List<string>();
Expression current_operation = null;
double output = 0;
var nodeCount = Nodes.Count();
for (int i = 0; i < nodeCount; i++) {
Okay there are a 3 popular ways:
1) Have all the php and html mixed in a single file but reference others
this means you have like a directory called libraries, and you reference those methods with html for example:
```php
<?php
require_once ("libs/authentication.php");
@CallumCarmicheal
CallumCarmicheal / The few line error that almost killed the business i work for.php
Last active March 28, 2017 13:35
The few line error that almost killed the business i work for
//
// What was in the source
//
// Old hashing method
if ($passwordType == 1)
if (!self::CheckPassword_Old($pass, $user))
return self::$E_LOGIN_STATUS_INVALID_PASSWORD_1;
// New hashing method