Skip to content

Instantly share code, notes, and snippets.

@fcoclavero
fcoclavero / instructions.md
Created December 28, 2020 21:55
Fix Razer device not detected on macOS Big Sur 11.1

@Jandalf I recently had to reset my System Integrity Protection settings (csrutil clear) and once again ran into this issue, where my Razer device was not recognized.

I have upgraded to macOS Big Sur 11.1, and I can confirm that the solutions by @avaddon and @rdabban, which had worked for me on 11.0, no longer work.

Manually loading the kernel extension (the kextload command) will display the error code 27 "Extension with identifiers com.razer.common.razerhid not approved to load. Please approve using System Preferences.", but no pop-up or "Allow" option would appear anywhere on the System Preferences.

Adding the Razer TeamID with the /usr/sbin/spctl kext-consent add R2H967U7J8 command showed me a pop-up, but with no "Allow" option, and no option to allow the kernel extension would appear in the System Preferences, so no good.

I finally managed to make it work by temporarily disabling System Integrity Protection (SIP), as follows:

@weavenet
weavenet / delete_all_object_versions.sh
Created May 4, 2015 05:21
Delete all versions of all files in s3 versioned bucket using AWS CLI and jq.
#!/bin/bash
bucket=$1
set -e
echo "Removing all versions from $bucket"
versions=`aws s3api list-object-versions --bucket $bucket |jq '.Versions'`
markers=`aws s3api list-object-versions --bucket $bucket |jq '.DeleteMarkers'`
@indraniel
indraniel / tar-gz-reader.go
Created February 23, 2015 19:05
Reading through a tar.gz file in Go / golang
package main
import (
"archive/tar"
"compress/gzip"
"flag"
"fmt"
"io"
"os"
)
@raliste
raliste / test.py
Created October 13, 2013 01:50
Super easy and scalable async queues with Python and Golang. And see nice stats by doing `gem install resque` and then `resque-web`. You might need to add your goworker queue into redis to make it show up in resque-web.
import redis
RESQUE_QUEUE = 'resque:queue:%s'
def test(n=0):
r = redis.Redis()
r.rpush(RESQUE_QUEUE % 'notifications', '{"class":"EmailNotification","args":["hi","there %s"]}' % n)
if __name__ == '__main__':
for i in xrange(100):
import theano
from pylearn2.models import mlp
from pylearn2.training_algorithms import sgd
from pylearn2.termination_criteria import EpochCounter
from pylearn2.datasets.dense_design_matrix import DenseDesignMatrix
import numpy as np
from random import randint
class XOR(DenseDesignMatrix):
@cowboy
cowboy / marshal_cache.rb
Created February 2, 2011 19:17
A very simple wrapper around Ruby's Marshal (tested in ruby 1.9.2p136)
# Ruby MarshalCache - v0.1 - 02/2/2011
# http://benalman.com/
#
# Copyright (c) 2011 "Cowboy" Ben Alman
# Dual licensed under the MIT and GPL licenses.
# http://benalman.com/about/license/
require 'zlib'
# A very basic cache that uses Marshal internally.