Skip to content

Instantly share code, notes, and snippets.

View CallumCarmicheal's full-sized avatar

Callum Carmicheal CallumCarmicheal

View GitHub Profile
@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
@CallumCarmicheal
CallumCarmicheal / Setting up Decaf-Emu for dummies like me!.md
Last active March 23, 2017 22:17
Setting up Decaf-Emu for dummies like me!.md

How to build on windows with Visual Studio for idiots!

Prereq: Install Windows SDK

Guide without images

To see images scroll down

  1. Clone the decaf-emu repository, git clone https://github.com/decaf-emu/decaf-emu.git
  2. Go into the downloaded repository and update the submodules git submodule update --init