Skip to content

Instantly share code, notes, and snippets.

View daksis's full-sized avatar

R daksis

View GitHub Profile
@b0gdanw
b0gdanw / DisableBigSur.sh
Last active June 14, 2024 13:33
Disable Big Sur services
#!/bin/zsh
#Credit: Original idea and script disable.sh by pwnsdx https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3
#Disabling unwanted services on macOS 11 Big Sur (11) and macOS Monterey (12)
#Disabling SIP is required ("csrutil disable" from Terminal in Recovery)
#Modifications are written in /private/var/db/com.apple.xpc.launchd/ disabled.plist and disabled.501.plist
# user
TODISABLE=()
@techpeace
techpeace / BigSurGPUFreeze.md
Last active July 21, 2022 10:27
Big Sur GPU freeze issues

Big Sur GPU Bug

Howdy! You‘re here because, ever since you upgraded your 2018 MacBook Pro to Big Sur, you’ve been experiencing consistent beachballing and hard freezing issues. You probably figured this out after finding lots of messages like this in the Console during a lock-up:

AMDRadeonX5000GLDriver.bundle/Contents/MacOS/ATIRadeonX5000SCLib.dylib: #2: No such file or directory
May 25 19:54:19 ogma Adobe CEF Helper (GPU)[3327]: getattrlist failed for /System/Library/Frameworks/OpenGL.framework/Resources//GLRendererFloat.bundle/GLRendererFloat: #2: No such file or directory
May 25 19:54:19 ogma VTDecoderXPCService[3328]: getattrlist failed for /Library/GPUBundles/AMDRadeonVADriver2.bundle/Contents/MacOS/AMDRadeonVADriver2: #2: No such file or directory
May 25 19:54:19 ogma VTDecoderXPCService[3328]: getattrlist failed for /System/Library/Extensions/AMDRadeonVADriver2.bundle/Contents/MacOS/AMDRadeonVADriver2: #2: No such file or directory
May 25 19:54:19 ogma VTDecoderXPCService[3328]: getattrlist fai
@fhunleth
fhunleth / ble.md
Last active December 7, 2023 19:55
Bluetooth with Nerves notes

UPDATE: THIS WAS WRITTEN BEFORE BlueHeron EXISTED

This is a braindump of my progress over the weekend to look into Bluetooth support on Nerves. While Bluetooth has a lot of specs, supporting a subset of BLE that makes it easy for Nerves devices to communicate with cell phones and back would be generally useful.

There are two options for BLE support on Nerves:

  1. Make a custom Nerves system that uses bluez
  2. Use Harald
@htr3n
htr3n / macos-ramdisk.md
Last active June 28, 2024 01:39
Creating RAM disk in macOS

Built-in

diskutil erasevolume HFS+ 'RAM Disk' `hdiutil attach -nobrowse -nomount ram://XXXXX`

where XXXXX is the size of the RAM disk in terms of memory blocks.

Notes:

@daksis
daksis / hitchhikers-guide-to-machine-learning.md
Created September 15, 2017 20:48
Hitchhikers Guide to Machine Learning Resources

Hitchhikers Guide to Machine Learning Resources

Reference Sources

  1. Project Rhea — online learning community where students teach other students. The tutorials here vary in detail and quality. Generally they are more that a definition at mathworld, less than a step by step. Good for getting the highlights on an unfamiliar topic
  2. Wolfram Mathworld — Like wikipedia, but only for Math. Go here when you have no idea what an "Isotopic Kernel is or why you would care. Mathworld will give you 80+ entries that are linked.
  3. Wikipedia Math Portal — the place to find everything math related on Wikipedia.

Math References

@yang-wei
yang-wei / destructuring.md
Last active July 4, 2024 16:56
Elm Destructuring (or Pattern Matching) cheatsheet

Should be work with 0.18

Destructuring(or pattern matching) is a way used to extract data from a data structure(tuple, list, record) that mirros the construction. Compare to other languages, Elm support much less destructuring but let's see what it got !

Tuple

myTuple = ("A", "B", "C")
myNestedTuple = ("A", "B", "C", ("X", "Y", "Z"))
@somebox
somebox / osx-setup.sh
Last active December 11, 2021 13:05 — forked from foz/osx-setup.sh.md
Set up an OSX machine from zero to awesome. Uses Homebrew (and cask, fonts, etc). Focused on Ruby/Rails development, includes rvm, xquartz, editor fonts, sublime text, and many tools.
#!/bin/bash
# A script to set up a new mac. Uses bash, homebrew, etc.
# Focused for ruby/rails development. Includes many utilities and apps:
# - homebrew, rvm, node
# - quicklook plugins, terminal fonts
# - browsers: chrome, firefox
# - dev: iterm2, sublime text, postgres, chrome devtools, etc.
# - team: slack, dropbox, google drive, skype, etc
module PunditExampleGroup
extend ::RSpec::Matchers::DSL
matcher :permit do |action|
match do |policy|
policy.public_send("#{action}?")
end
failure_message do |policy|
"#{policy.class} does not permit #{action} on #{policy.record} for #{policy.user.inspect}."
@Kartones
Kartones / postgres-cheatsheet.md
Last active July 2, 2024 22:38
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)