Skip to content

Instantly share code, notes, and snippets.

View androm3da's full-sized avatar

Brian Cain androm3da

View GitHub Profile
@rmcgibbo
rmcgibbo / Install Intel-CPU OpenCL on Ubuntu.md
Last active November 6, 2021 10:00
Installing Intel CPU OpenCL on Ubuntu 12.04

Open Computing Language (OpenCL) is a language and framework for writing computationally intensive kernels that run accross heterogenious platforms, including GPUs, CPUs, and perhaps other more esoteric devices.

Intel provides an OpenCL implementation for Intel CPUs, but there's not a lot of instructions on how to get it set up. Here's what I did.

Installing Intel CPU OpenCL on Ubuntu (12.04)

  1. Download the Intel® SDK for OpenCL* Applications XE 2013 from the Intel website, here http://software.intel.com/en-us/vcsource/tools/opencl-sdk-xe. The download is a tarball -- the one I got is called intel_sdk_for_ocl_applications_2013_xe_sdk_3.0.67279_x64.tgz
  2. Unpack the tarball and cd into the new directory
@semenko
semenko / dmidecode
Last active October 26, 2021 02:57
Dell XPS 13 2015 model 9343 on Ubuntu 15.04, dmidecode, lsusb, lspci
$ sudo dmidecode
# dmidecode 2.12
# SMBIOS entry point at 0x000f0000
SMBIOS 2.8 present.
<SNIP>
Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
@mnot
mnot / snowden-ietf93.md
Last active November 5, 2024 06:22
Transcript of Edward Snowden's comments at IETF93.
@CAFxX
CAFxX / persistent_pipes_linux.md
Last active September 2, 2024 12:08
Persistent pipes/circular buffers for Linux

📂 Persistent "pipes" in Linux

In a project I'm working on I ran into the requirement of having some sort of persistent FIFO buffer or pipe in Linux, i.e. something file-like that could accept writes from a process and persist it to disk until a second process reads (and acknowledges) it. The persistence should be both across process restarts as well as OS restarts.

AFAICT unfortunately in the Linux world such a primitive does not exist (named pipes/FIFOs do not persist

@smoser
smoser / README.md
Last active February 26, 2016 17:30
py2or3: attempt at an executable allowing programs to use python2 or python3 if they'd work in both.

The Problem

During transition to python3, much code is now written that works on python2 or python3. Python 2 is becoming less common, and has even been removed from default installs of Ubuntu Server in 15.10 and going forward.

A summary of Ubuntu releases and python inclusion in the default install of Ubuntu Server:

  • 12.04 precise: python 2 only (2.7.3)
  • 14.04 trusty: python 2 only (2.7.5) and python3 (3.4.0)
  • 14.10 utopic: python 2 (2.7.8) and python3 (3.4.2)
@yurydelendik
yurydelendik / !wasmllvm.md
Last active December 7, 2024 18:08
Using WebAssembly in LLVM

NOTE: the content is out-of-date. All development is moved to the https://github.com/yurydelendik/wasmception

Using WebAssembly in LLVM

Compiling

# locations, e.g.
export WORKDIR=~/llvmwasm; mkdir -p $WORKDIR
export INSTALLDIR=$WORKDIR
anonymous
anonymous / penalties
Created November 5, 2015 01:05
2009082257 (OAK, OWN 30, Q4) R.Schmitt kicks 76 yards from OAK 30 to SF -6. M.Spurlock, Touchback. PENALTY on OAK, Offside on Free Kick, 5 yards, enforced at SF 20.
2009091307 (NO, OWN 45, Q2) T.Morstead kicks 55 yards from NO 45 to end zone, Touchback. Unsportsmanlike Conduct penalty on DET#26 after touchdown was enforced on kickoff.
2009092013 (SD, OWN 30, Q2) N.Kaeding kicks 75 yards from SD 30 to BAL -5. C.Carr, Touchback. PENALTY on SD-L.Naanee, Offside on Free Kick, 5 yards, enforced at BAL 20.
2009092710 (CHI, OWN 45, Q4) Penalty on TD play enforced on kickoff. R.Gould kicks 55 yards from CHI 45 to end zone, Touchback.
2009101809 (ARI, OWN 45, Q1) Ball placed on 45 due to penalty on prior scrimmage play. N.Rackers kicks 55 yards from ARI 45 to end zone, Touchback.
2009101811 (NYJ, OWN 45, Q2) Prior penalty was enforced on the kickoff. J.Feely kicks 55 yards from NYJ 45 to end zone, Touchback.
2009112602 (DEN, OWN 30, Q1) M.Prater kicks 70 yards from DEN 30 to end zone, Touchback. PENALTY on DEN-D.Reid
@daniel-j-h
daniel-j-h / ld.gold.sh
Last active June 19, 2024 00:07
default to ld.gold on Ubuntu'ish
update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.gold" 20
update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.bfd" 10
update-alternatives --config ld
ld --version
GNU gold
export CPP=cpp-5 gcc-5 g++-5
env CXXFLAGS='-march=native -flto -fuse-linker-plugin' cmake .. -DCMAKE_BUILD_TYPE=Release
@billiegoose
billiegoose / mergelog.py
Created December 9, 2015 17:00 — forked from seanh/mergelog.py
A custom merge driver for git, for automatically merging my 'log.txt' file in a simplistic way.
#!/bin/env python
"""mergelog
This is a custom merge driver for git. It should be called from git
with a stanza in .git.config like this:
[merge "mergelog"]
name = A custom merge driver for my log.txt file.
driver = ~/scripts/mergelog %O %A %B %L
recursive = binary
# Building just clang-9.0 for creduce.
execute_process(
COMMAND "grep" "^processor" "/proc/cpuinfo"
COMMAND "wc" "-l"
COMMAND "tr" "-d" "'\n'"
OUTPUT_VARIABLE ncpu)
message("Building with ${ncpu} cpus")
set(LLVM_PARALLEL_COMPILE_JOBS ${ncpu} CACHE STRING "")