Skip to content

Instantly share code, notes, and snippets.

View LizAinslie's full-sized avatar
⚒️
BUILD COOL SHIT BUILD COOL SHIT BUILD COOL SHIT

Liz Ainslie LizAinslie

⚒️
BUILD COOL SHIT BUILD COOL SHIT BUILD COOL SHIT
View GitHub Profile
@Sascha-T
Sascha-T / Main.java
Last active February 17, 2024 02:59
CPUID Java 21 :p
/*
Demonstrates usage of CPUID on Windows in a single Java file, and prints the processor vendor string.
Uses Java 21 language features.
*/
import java.lang.foreign.*;
import java.lang.invoke.MethodHandle;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
@kkinder
kkinder / Quasar.xml
Created February 6, 2020 20:23
Quasar Live Templates for Jetbrains IDEs
<templateSet group="Quasar">
<template name="q-ajax-bar" value="&lt;q-ajax-bar&#10; ref=&quot;$ref$&quot;&#10; position=&quot;$position$&quot;&#10; color=&quot;$color$&quot;&#10; size=&quot;$size$&quot;&#10; skip-hijack/&gt;&#10;" description="Ajax Bar" toReformat="true" toShortenFQNames="true">
<variable name="ref" expression="" defaultValue="&quot;bar&quot;" alwaysStopAt="true" />
<variable name="position" expression="" defaultValue="&quot;bottom&quot;" alwaysStopAt="true" />
<variable name="color" expression="" defaultValue="&quot;accent&quot;" alwaysStopAt="true" />
<variable name="size" expression="" defaultValue="&quot;10px&quot;" alwaysStopAt="true" />
<context>
<option name="VUE_TEMPLATE" value="true" />
</context>
</template>
@LizAinslie
LizAinslie / kitchen-sink.js
Created January 23, 2019 17:43
A kitchen sink example of Canvo options
const options = {
canvas: document.getElementById('editor'), // Or just 'editor'
controls: document.getElementById('toolbar'), // Or just 'toolbar'
controlsOptions: {
framework: 'semantic_ui', // Other options are 'bootstrap_3' or 'bootstrap_4'
},
};
const editor = new Editor(options);
@lucario
lucario / reddit.json
Last active February 22, 2020 08:55
Reddit webhook for IFTTT and Discord
{
"username": "Reddit",
"avatar_url": "https://lh3.googleusercontent.com/J41hsV2swVteoeB8pDhqbQR3H83NrEBFv2q_kYdq1xp9vsI1Gz9A9pzjcwX_JrZpPGsa=w300",
"embeds": [{
"color": "16597762",
"author": {
"name": "{{Author}}"
},
"title": "{{Title}}",
"url": "{{PostURL}}",
@kmhofmann
kmhofmann / building_tensorflow.md
Last active March 2, 2024 18:37
Building TensorFlow from source

Building TensorFlow from source (TF 2.3.0, Ubuntu 20.04)

Why build from source?

The official instructions on installing TensorFlow are here: https://www.tensorflow.org/install. If you want to install TensorFlow just using pip, you are running a supported Ubuntu LTS distribution, and you're happy to install the respective tested CUDA versions (which often are outdated), by all means go ahead. A good alternative may be to run a Docker image.

I am usually unhappy with installing what in effect are pre-built binaries. These binaries are often not compatible with the Ubuntu version I am running, the CUDA version that I have installed, and so on. Furthermore, they may be slower than binaries optimized for the target architecture, since certain instructions are not being used (e.g. AVX2, FMA).

So installing TensorFlow from source becomes a necessity. The official instructions on building TensorFlow from source are here: ht

@macroxela
macroxela / Alien.java
Created April 24, 2014 01:46
A Galaga game developed in Java
import java.util.*;
public class Alien extends GameObject
{
Random dice;
int cnt = 1;
int dx;
int rand = 0;
boolean shot;
@torgeir
torgeir / minimal-maven-pom.xml
Last active February 17, 2024 00:08
A minimal maven pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>gd.wa</groupId>
<artifactId>minimal-pom</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
anonymous
anonymous / fish.py
Created August 30, 2013 17:41
><> python interpreter.
#!/usr/local/bin/python3.2
"""
Python interpreter for the esoteric language ><> (pronounced /ˈfɪʃ/).
Usage: ./fish.py --help
More information: http://esolangs.org/wiki/Fish
Requires python 2.7/3.2 or higher.
@randrews
randrews / lua_map.c
Created April 23, 2011 22:16
Example of embedding Lua in C
#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>
#include <stdlib.h>
int map_create(lua_State *lua);
int map_slice(lua_State *lua);
int main(int argc, char **argv){
lua_State *lua = lua_open();