Skip to content

Instantly share code, notes, and snippets.

View wadewegner's full-sized avatar

Wade Wegner wadewegner

View GitHub Profile
@wadewegner
wadewegner / setup.sh
Created February 18, 2026 13:22
These are the steps I ran to configure https://github.com/RichardAtCT/claude-code-telegram/tree/main on a DO droplet
sudo apt update
# install zsh
sudo apt install zsh -y
# install other essentials
sudo apt install build-essential procps curl file git -y
# install gh
sudo apt install gh
@wadewegner
wadewegner / addselftosqlsysadmin.cmd
Created January 25, 2012 18:35
Script to add the current user to the sysadmin role in SQL Server
@echo off
rem
rem ****************************************************************************
rem
rem Copyright (c) Microsoft Corporation. All rights reserved.
rem This code is licensed under the Microsoft Public License.
rem THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
rem ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
rem IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
rem PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
@wadewegner
wadewegner / instructions.md
Created December 17, 2022 19:06
Install apps (like Netflix and Prime) on Peloton Tread+

turn on developer mode

enable USB connection

enable untrusted apps

Find a microUSB to USB cable that supports data (some only support charging)

Pop the Peloton cover off the back

@wadewegner
wadewegner / default.md
Created July 9, 2025 17:28 — forked from cablej/default.md
Cluely System prompt

<core_identity> You are an assistant called Cluely, developed and created by Cluely, whose sole purpose is to analyze and solve problems asked by the user or shown on the screen. Your responses must be specific, accurate, and actionable. </core_identity>

<general_guidelines>

  • NEVER use meta-phrases (e.g., "let me help you", "I can see that").
  • NEVER summarize unless explicitly requested.
  • NEVER provide unsolicited advice.
  • NEVER refer to "screenshot" or "image" - refer to it as "the screen" if needed.
  • ALWAYS be specific, detailed, and accurate.
@wadewegner
wadewegner / create_connectedApp.js
Last active December 30, 2024 16:07
Create a Connected App with consumer secret using jsforce and consumer client.
let jsforce = require('jsforce');
let conn = new jsforce.Connection({
// you can change loginUrl to connect to sandbox or prerelease env.
// loginUrl : 'https://test.salesforce.com'
});
let username = 'YOUR_USERNAME';
let password = 'YOUR_PASSWORD';
let fullName = 'FULL_NAME'; // no spaces
@wadewegner
wadewegner / install-minecraft.sh
Last active October 25, 2024 05:11
Steps for installing Minecraft, Forge, and Mods for 1.11.2
# install forge for 1.12.2
# wget https://s3.amazonaws.com/Minecraft.Download/versions/1.11.2/minecraft_server.1.11.2.jar
# wget https://s3.amazonaws.com/Minecraft.Download/versions/1.12.2/minecraft_server.1.12.2.jar
wget https://launcher.mojang.com/mc/game/1.12.2/server/886945bfb2b978778c3a0288fd7fab09d315b25f/server.jar -O minecraft_server.1.12.2.jar
# install (first time)
java -Xmx1024M -Xms1024M -jar minecraft_server.1.12.2.jar nogui
# set eula acceptance to true
vi eula.txt
@wadewegner
wadewegner / CreateCustomField.xml
Created February 21, 2014 17:58
Examples of HTTP requests and responses for Salesforce SOAP and Metadata API calls.
POST https://na15.salesforce.com/services/Soap/m/29.0/00Di0000000icUB HTTP/1.1
SOAPAction: create
Content-Type: text/xml; charset=utf-8
Host: na15.salesforce.com
Content-Length: 894
Expect: 100-continue
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:apex="http://soap.sforce.com/2006/08/apex" xmlns:cmd="http://soap.sforce.com/2006/04/metadata" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
@wadewegner
wadewegner / upload_rest.py
Last active August 9, 2024 16:01
Upload attachment to Salesforce using Python
import requests
import base64
import json
from simple_salesforce import Salesforce
userName = ''
password = ''
securityToken = ''
instance = ''
@wadewegner
wadewegner / gettoken_local.py
Last active February 24, 2023 00:39
Simple Python scripts for making a token request against the Force.com REST APIs. The first does not include the security token and the second does. You will want to use the second one.
import requests
consumer_key = "YOUR_CONSUMER_KEY"
consumer_secret = "YOUR_CUSTOMER_SECRET"
username = "YOUR_USER_NAME"
password = "YOUR_PASSWORD"
payload = {
'grant_type': 'password',
'client_id': consumer_key,
@wadewegner
wadewegner / api-design-principles.md
Last active December 11, 2022 02:01
Top 10 API Design Principles
  1. Make the API easy to use and understand.
  2. Provide complete and accurate documentation.
  3. Use descriptive and consistent naming conventions.
  4. Support common HTTP methods such as GET, PUT, POST, and DELETE.
  5. Use standard data formats like JSON and XML.
  6. Design the API to be flexible and extensible.
  7. Support versioning to allow for changes and additions to be made easily.
  8. Implement error handling and provide clear error messages.
  9. Use security best practices to protect data and prevent unauthorized access.
  10. Use API keys or other authentication methods to identify and authorize users.