Skip to content

Instantly share code, notes, and snippets.

@DavidHarper
DavidHarper / ibm2ieee.asm
Created May 21, 2022 09:18
VM/370 assembler code to convert VM/370 64-bit float to IEEE 64-bit float
* Name: IBM2IEEE ASSEMBLE IBM00010
* IBM00020
* Author: David Harper, University of Liverpool Computer Lab IBM00030
* Email: [REDACTED] IBM00040
* Date: 24 April 1989 IBM00050
* IBM00060
* Purpose: To convert IBM Dfloat data to IEEE IBM00070
* IBM00080
* Linkage convention: Waterloo C IBM00090
* IBM00100
@zheksoon
zheksoon / libui-react-like-syntax-proposal.c
Last active March 20, 2018 08:07
Pure C-complaint React-like syntax proposal for libui for building dynamic native user interfaces in reactive manner
// Pure C-complaint React-like syntax proposal for libui for building dynamic native
// user interfaces in reactive manner.
// "h" function is vararg function that returns itself, so it's possible to chain calls
// without need to write "h" again and again, only in cases you need to break the chain
// with semicolon.
// As its first parameter "h" takes component function pointer of the next definition:
// void Component(uiConstructor h, ...)
// and then list of key-value pairs a-la props in React.js land. The props list must end
// gets uid 0 (iOS 11)
// add patchfinder and you should be good
// Abraham Masri @cheesecakeufo
/*
* Purpose: iterates over the procs and finds our proc
*/
uint64_t get_our_proc() {
@vestrel00
vestrel00 / Dagger2SimpleExample.java
Last active October 7, 2021 19:59
A: Dagger.android 2.11 simple example with support for Singleton, PerActivity, PerFragment, and PerChildFragment scopes
// This is a super simplified example of how to use the new dagger.android framework
// introduced in Dagger 2.10. For a more complete, in-depth guide to dagger.android
// read https://proandroiddev.com/how-to-android-dagger-2-10-2-11-butterknife-mvp-part-1-eb0f6b970fd
// For a complete codebase using dagger.android 2.11-2.17, butterknife 8.7-8.8, and MVP,
// see https://github.com/vestrel00/android-dagger-butterknife-mvp
// This example works with Dagger 2.11-2.17. Starting with Dagger 2.11,
// @ContributesAndroidInjector was introduced removing the need to define @Subcomponent classes.
@arastu
arastu / macos-http-proxy-func.sh
Last active May 7, 2017 16:43
Shell function to set, on or off http and https proxy
# add this function to .zshrc or .bashrc
# Example:
# Set http and https proxy:
# $ macsetproxy 127.0.0.1 8118
#
# Turn http and https proxy off
# $ macoffproxy
#
# Turn http and https proxy on
# $ maconproxy
@andreibosco
andreibosco / creative-cloud-disable.md
Last active June 26, 2024 09:36
disable creative cloud startup on mac
@prince-ph0en1x
prince-ph0en1x / qubit.py
Last active August 27, 2017 12:00 — forked from limitedmage/qubit.py
Python Quantum Computing simulator
from random import random
class QuDit:
nD = 0 # Hilbert Space Dimension
nQ = 0 # Number of Qudits used in simulation
state = []
# Initialize
def __init__(self, D, Q):
@domnikl
domnikl / LICENSE
Last active September 20, 2023 11:58
C function to dump memory
Copyright 2018 Dominik Liebler
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR O
@patrickhammond
patrickhammond / android_instructions.md
Last active June 6, 2024 05:19
Easily setup an Android development environment on a Mac

Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.

Prerequisites (for Homebrew at a minimum, lots of other tools need these too):

  • XCode is installed (via the App Store)
  • XCode command line tools are installed (xcode-select --install will prompt up a dialog)
  • Java

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"