Skip to content

Instantly share code, notes, and snippets.

View souzaonofre's full-sized avatar

Onofre Souza souzaonofre

View GitHub Profile

Electron is tricky to get set up on Windows Subsystem for Linux, but it can work!

Four things needed overall:

  1. you need WSL2, not WSL1
  2. you need node, of course, and that part isn't so bad
  3. you need to apt install several dependencies
  4. you need an X Server so it can display the electron GUI over in Windows-land

Setup instructions, in order:

@stkent
stkent / android-bluetooth-low-energy-resources.md
Last active August 1, 2024 08:47
Android Bluetooth Low Energy (BLE) Resources
@littlefuntik
littlefuntik / Dockerfile
Last active November 15, 2023 07:16
alpine linux -- make install -- php-fpm 7.1.1 + geoip-1.1.1 + xdebug-2.5.0
## Container console commands (Windows: PowerShell)
# docker build --no-cache -t php:7.1
# docker run --name test-php -v "${PWD}:/var/www:rw" -p "9001:9000" -d php:7.1
# docker exec -ti php:7.1 /bin/sh
# docker rm test-php --force
# docker rmi php:7.1
FROM alpine
RUN \
addgroup -g 82 -S www-data && adduser -u 82 -D -S -G www-data www-data && \
@goncalvesjoao
goncalvesjoao / Gemfile
Last active November 13, 2020 01:52
Changes you need to make in order to make Devise use JWT Header Authentication
# Add the "https://github.com/jwt/ruby-jwt" gem to your "Gemfile"
gem 'jwt'
@SoulAuctioneer
SoulAuctioneer / Bluetooth.java
Created May 1, 2015 16:55
Bluetooth Low Energy (BLE) helper class for Android, including a queue for characteristic writes. See http://stackoverflow.com/questions/18011816/has-native-android-ble-gatt-implementation-synchronous-nature
package com.nojack;
import android.app.Activity;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattCallback;
import android.bluetooth.BluetoothGattCharacteristic;
import android.bluetooth.BluetoothGattDescriptor;
import android.bluetooth.BluetoothGattService;
@chrisb
chrisb / gist:4d6a09c6cc1ca2e1b14e
Last active November 25, 2022 04:15
Homebrew, Ruby, and Rails on OS X 10.10

OS X 10.10 Guide

Here's what I did to get things working.

1. Install Xcode 6

Yep, over at: https://developer.apple.com

2. Install the Command Line Tools (CLT)

@yuvadm
yuvadm / README.md
Last active February 14, 2024 13:30
Somagic SMI-2021CBE Firmware
@radare
radare / void-android.sh
Created November 13, 2013 12:16
script to install voidlinux on android/firefoxos devices via adb
#!/bin/sh
# TODO
# - check free disk
# - check return values for every command
V=/data/void
DNS=8.8.8.8
URL=http://xbps.nopcode.org/rootfs/
ROOTFS=void-raspberrypi-rootfs-20130811.tar.xz
@felipec
felipec / autogroups
Last active November 22, 2020 04:02
Display a list of all the processes listed by their autogroup (CONFIG_SCHED_AUTOGROUP)
#!/usr/bin/env ruby
$autogroups = Hash.new { |h,k| h[k] = [] }
Dir.glob('/proc/*').each do |e|
pid = File.basename(e).to_i
next if pid == 0
begin
cmdline = File.read(e + '/cmdline').split("\0").join(" ")
next if cmdline.empty?
@sam-github
sam-github / dsl-print
Created March 6, 2012 23:26
Example of a lua DSL language
#!/usr/bin/env lua
--[[
dsl-print [some.dsl]
Example of a lua DSL language, that can use function call or assignment to define
keys, and uses call sequence to implicitly define nesting.
]]
function dsl(code, file)
local loaded, estr = loadstring(code, file)