Skip to content

Instantly share code, notes, and snippets.

@nichtich
nichtich / README.md
Last active April 25, 2024 20:47 — forked from oodavid/README.md
How to automatically deploy from GitHub

Deploy your site with git

This gist assumes:

  • you have an online remote repository (github / bitbucket etc.)
  • you have a local git repo
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by Apache
  • the Apache user is named www-data (may be apache on other systems)
@CallumVass
CallumVass / anthropic.ts
Last active April 25, 2024 20:46
Haiku structured data - My own implementation of instructor for Haiku
import Anthropic from "@anthropic-ai/sdk";
import type { MessageParam } from "@anthropic-ai/sdk/resources";
import dotenv from "dotenv";
import { Instructor } from "./instructor";
import type { z } from "zod";
dotenv.config();
function sendToClaude<T>(message: MessageParam, schema: z.Schema<T>) {
const anthropicClient = new Anthropic({
@roachhd
roachhd / README.md
Last active April 25, 2024 20:45
Basics of BrainFuck

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

BrainFuck Programming Tutorial by: Katie

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

INTRODUCTION

@Comamoca
Comamoca / single-binary-languages.md
Last active April 25, 2024 20:45
シングルバイナリになる言語一覧
  • C

    手続き型の汎用高水準言語。
    ライブラリを静的リンクすることでシングルバイナリを生成できる。

  • C++

  • C#

@krisha
krisha / induction_hob.ino
Created September 29, 2015 12:18
Arduino code for reading/writing Microchip EEPROM 93LC66
//#include <SPI.h>
/* Arduino code to read out and write EEPROM 93LC66
which is used in an AEG 55GAD84AE induction hob.
Some bits were flipped depending on temperature.
Writing it back solved this problem.
*/
/* pin defines eliminated during SPI lib testing...
arduino - 93LC66
@brookst
brookst / fs5000.py
Last active April 25, 2024 20:42
Serial interface to Bosean FS-5000 radiation detector
#!/usr/bin/env python3
__author__ = "Tim Brooks"
__email__ = "brooks@skoorb.net"
__date__ = "2024-04-23"
import datetime
from enum import Enum, Flag
import logging
import serial
import serial.tools.list_ports as list_ports
@jhjensen2
jhjensen2 / graph_edit_distance.py
Last active April 25, 2024 20:41
Compute graph edit distance between two molecules using RDKit and Networkx
'''
Written by Jan H. Jensen, 2020
'''
from rdkit import Chem
import networkx as nx
def get_graph(mol):
Chem.Kekulize(mol)
atoms = [atom.GetAtomicNum() for atom in mol.GetAtoms()]
@ogbenisho
ogbenisho / Hadoop Windows Installation and Running MapReduce Jobs.md
Created April 25, 2024 20:35 — forked from vorpal56/Hadoop Windows Installation and Running MapReduce Jobs.md
Hadoop 3.2.1 Windows 10 Installation step by step guide and running MapReduce Jobs

Setup Hadoop on Windows 10 machines

Consolidated instructions on how to setup and run Hadoop on Windows 10 machines. This is exactly written from Hadoop 3.2.1 Installation on Windows 10 step by step guide. Big thanks to Raymond, the original writer. If you already have Hadoop installed and configured on your machine, you can go to the Running MapReduce Jobs section.

Required tools

  1. Java JDK - used to run the Hadoop since it's built using Java
  2. 7Zip or WinRAR - unzip Hadoop binary package; anything that unzips tar.gz
  3. CMD or Powershell - used to test environment variables and run Hadoop

Step 1 - Download and extract Hadoop

// https://forum.unity.com/threads/clear-old-texture-references-from-materials.318769/
#define UPDATING_FLOAT_TO_INT
#if UNITY_EDITOR
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
public class MaterialPropertyCleaner : EditorWindow {
private const float REMOVE_BUTTON_WIDTH = 60;
@JustinGrote
JustinGrote / Get-ScriptModules.ps1
Last active February 16, 2024 15:48
Find the module names for all commands used in a script
#requires -version 7
using namespace System.Management.Automation.Language
using namespace Collections.Generic.Queue
function Get-ScriptModules {
<#
.SCRIPTBLOCK
Given a script, returns a list of all the modules it uses.
#>