Skip to content

Instantly share code, notes, and snippets.

@theevilbit
theevilbit / screenshot.m
Last active April 19, 2024 07:55
Make a screenshot on macOS using Objective-C
/*
Compile:
gcc -framework Foundation -framework AppKit screenshot.m -o screenshot
*/
#import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>
int main(void) {
@jjsanderson
jjsanderson / network-manager-raspbian-2020-02-05.md
Last active April 20, 2023 17:25
Installing Network Manager on Raspbian 2020-02-05

Installing Network Manager on Raspbian 2020-02-05

NOTE:
This guide was written more than two years ago, which in Pi years means it's now graduated college, or something. Inevitably, it's at least a little out of date, and it may even be entirely misleading. There are several helpful suggestions in the comments (thanks everyone), and most recently a report that what's here plain doesn't work on current (early 2022) Raspbian. Which isn't even called 'Raspbian' any more.
As of Jan 2022 I'm partially back in my office-which-has-access-to-eduroam, and I do have a need to build up a fresh Pi desktop. If and when I get that working I'll update this guide. In the meantime: good luck, and please leave a comment to report success or failure.
(June 2022) Nope, I still haven't actually tried any of this myself. However, I have had to troubleshoot eduroam wifi on my Linux ThinkPad. As of Ubuntu 22.04 it would no longer connect. [This Stack Exchange answer](https://askubuntu.com/questions/27976

Removing a Mac's Firmware Password By Reflashing EFI ROM

According to Apple, the only way to remove an unknown firmware password from a MacBook (2011 and later) is to take it to the Apple Store with the original proof-of-purchase. However, I've found that there is another way, which I've been successful with for the unibody MacBook Pro--it's essentially just modifying a couple bytes in the EFI ROM, which should be simple. What's not simple, however, is figuring out how to read and write to the EFI chip. In this post, I'll talk about the process that I figured out and what worked for me.

The Official Method

Apple's method of resetting the firmware password is not reproducible, as Apple generates an SCBO file that unlocks the EFI using their private key. You can read more about this process here. The problem with this system is that, if you are in the unfortunate situation of neither having the firmware unlock pass

@narendrakpatel
narendrakpatel / Resources.md
Created February 15, 2019 09:18
Resources for beginners in Blockchain Technology
@xl7dev
xl7dev / VMwareFusion_Export_ovf.txt
Last active April 24, 2024 21:52
HowTo Export a VM in OVA format in VMware Fusion for OS X
> cd /Applications/VMware Fusion.app/Contents/Library/VMware OVF Tool
> ./ovftool --acceptAllEulas /Users/marco/Documents/Virtual\ Machines.localized/Windows\ 8.1\ x64.vmwarevm/Windows\ 8.1\ x64.vmx /Users/marco/Desktop/Win81.ova
@noelboss
noelboss / git-deployment.md
Last active May 2, 2024 15:47
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@jonathanmarvens
jonathanmarvens / gist:28979ec94a978b930736
Created January 2, 2016 13:42 — forked from zliuva/gist:1084476
A minimal Mach-o x64 executable for OS X
; A minimal Mach-o x64 executable for OS X (also see below Mountain Lion version)
;
; $ nasm -f bin -o tiny_hello tiny_hello.s
; $ chmod +x tiny_hello
; $ ./tiny_hello
; Hello World!
; $
; c.f.
; http://osxbook.com/blog/2009/03/15/crafting-a-tiny-mach-o-executable/ ( the original tiny mach-o executable )
@suapapa
suapapa / dependencies.sh
Created May 10, 2012 03:13
Visualize dependencies of binaries and libraries on Linux
#!/bin/bash
# Original script came from;
# http://domseichter.blogspot.com/2008/02/visualize-dependencies-of-binaries-and.html
# Written by Dominik Seichter and added patch from pfree
# analyze a given file on its
# dependecies using ldd and write
# the results to a given temporary file
#
@alejandro
alejandro / latexParser.js
Created February 11, 2012 18:44
LaTeX Parser
/*
ASC
*/
EClass = [
0,0,0,0,0,0,0,0,0,0,56,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,0,0,0,5,0,2,8,0,0,0,0,55,12,0,0,0,0,0,0,0,0,0,0,0,0,0,51,9,0,10,0,0,0,53,0,35,0,0,34,0,0,0,0,37,0,0,42,39,0,50,40,36,41,45,0,38,0,0,46,1,47,6,7,0,22,15,33,24,16,19,23,48,21,43,28,13,20,17,18,30,52,31,14,27,32,25,44,29,57,26,3,0,4,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
]
/*
ACCs
*/