Skip to content

Instantly share code, notes, and snippets.

@nadavrot
nadavrot / Matrix.md
Last active April 20, 2025 12:59
Efficient matrix multiplication

High-Performance Matrix Multiplication

This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).

Intro

Matrix multiplication is a mathematical operation that defines the product of

@dabit3
dabit3 / React Native Easings
Created August 1, 2016 03:38
React Native Easing animations
'use strict';
var React = require('react-native');
var {
AppRegistry,
StyleSheet,
Text,
View,
Easing,
Animated,
@keegoid
keegoid / WindowsBootEFI.sh
Last active May 24, 2024 15:30
How to repair Windows Boot Manager from Linux
# use Windows repair disc to run Startup Repair
# update grub config file for EFI system
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg # Fedora
sudo update-grub # Ubuntu
# if grub doesn't find Windows Boot Manager
# find EFI partition (could be on sdb, sdc, etc if you have more than one hard drive)
gdisk -l /dev/sda
@bmoren
bmoren / fence.js
Created July 1, 2015 21:55
HTML5 geolocation geofence location detection (without geofence API)
window.onload = function() {
var startPos;
var startPosLat;
var startPosLong;
var distance;
if (navigator.geolocation) {
startPosLat = 44.95716993150707;
startPosLong = -93.28439280496818;
@staltz
staltz / introrx.md
Last active April 21, 2025 04:15
The introduction to Reactive Programming you've been missing
@asiviero
asiviero / child_window.js
Created November 7, 2013 01:43
Open a child window on Alloy/Titanium
$.child_window.open();
@aaronksaunders
aaronksaunders / app_snippet.js
Last active July 11, 2020 14:07
One way to do bulk updates and deletes with Appcelerator Alloy Collections
// add all items to collection
Alloy.Collections.Fugitive.reset([{
"name" : "Jeff Haynie"
}, {
"name" : "Nolan Wright"
}, {
"name" : "Don Thorp"
}, {
"name" : "Marshall Culpepper"
}, {
@tonylukasavage
tonylukasavage / alloy.js
Created February 20, 2013 18:34
Alloy - global transform function
Alloy.Globals.transformFunction = function(model) {
// code for your transform function
}
@bhatfield
bhatfield / index.js
Last active December 11, 2015 10:48
Alloy Migration Test
$.index.open();
function doClick(e) {
Ti.API.info(JSON.stringify(e));
}
var library = Alloy.Collections.book;
library.fetch();
Ti.API.info(JSON.stringify(library));
@applehat
applehat / alloy.js
Last active December 11, 2015 06:28
Alloy.Globals.settings = {}; // Create Empty Object.
/* Settings Getter - Can also just access Alloy.Globals.settings[key] */
Alloy.Globals.settings.get = function(key) {
return Alloy.Globals.settings[key] || null;
}
/* Settings Saver */
Alloy.Globals.settings.set = function(key,value) {
var settings = Alloy.createCollection('settings');