Skip to content

Instantly share code, notes, and snippets.

@berkedel
berkedel / fix-sudoers-issue-on-macos-catalina.md
Created January 3, 2020 11:21
Fix `sudoers` issue on macOS Catalina

Fix sudoers Issue on macOS Catalina

If you messed up with editing sudoers, this solution is for you. The solution is limited to restoring /etc/sudoers file to the original state. It is easier to mess up your config such as saving wrong format, etc.

How to Fix

  • Please reboot your macOS into recovery mode. While rebooting press and hold Cmd+R key.
  • After you completely reboot, you will see a dialog. You need to open Terminal by clicking Utilities > Terminal on menu.
  • In order to mount /etc as writable state, you need to disable SIP first by executing csrutil disable.
  • Reboot into single user mode. While rebooting press and hold Cmd+S key.

This page is a curated collection of Jupyter/IPython notebooks that are notable for some reason. Feel free to add new content here, but please try to only include links to notebooks that include interesting visual or technical content; this should not simply be a dump of a Google search on every ipynb file out there.

Important contribution instructions: If you add new content, please ensure that for any notebook you link to, the link is to the rendered version using nbviewer, rather than the raw file. Simply paste the notebook URL in the nbviewer box and copy the resulting URL of the rendered version. This will make it much easier for visitors to be able to immediately access the new content.

Note that Matt Davis has conveniently written a set of bookmarklets and extensions to make it a one-click affair to load a Notebook URL into your browser of choice, directly opening into nbviewer.

@disler
disler / README.md
Last active December 11, 2024 17:52
Use Meta Prompting to rapidly generate results in the GenAI Age

Meta Prompting

In the Generative AI Age your ability to generate prompts is your ability to generate results.

Guide

Claude 3.5 Sonnet and o1 series models are recommended for meta prompting.

Replace {{user-input}} with your own input to generate prompts.

Use mp_*.txt as example user-inputs to see how to generate high quality prompts.

@brazilnut2000
brazilnut2000 / gitignore template.txt
Last active December 11, 2024 17:51
GIT: gitignore template for c# development
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
###################
# compiled source #
###################
*.com
*.class
*.dll
*.exe
@RobTrew
RobTrew / soundDeviceToggle.js
Last active December 11, 2024 17:51
Toggling OS X Sound Output Devices with JXA Javascript for Automation (OS X 10.10)
// Rob Trew @complexpoint 2015
function run() {
"use strict";
var blnUseKeyboardMaestro = false;
// EDIT TO NAMES OF TWO ALTERNATIVE SOUND OUTPUT DEVICES
var dctSources = { // A unique substring for each is enough
primary: "Internal",
secondary: "Elgato"
@jiaaro
jiaaro / hotkey_helpers.js
Last active December 11, 2024 17:51
Mac Automation – Javascript (JSX) Hotkey helpers
// How to use:
// 1. Open "Script Editor" (requires OS X 10.10 Yosemite)
// 2. Change the language from "AppleScript" to "JavaScript"
// 3. Paste the code below and replace the safari example.
//
// More info:
// https://developer.apple.com/library/mac/releasenotes/InterapplicationCommunication/RN-JavaScriptForAutomation/index.html
var sys_events = Application("System Events");
@promto-c
promto-c / General-Web-App-GitHub-Pages-Deployment-Guide.md
Created December 28, 2023 16:59
Comprehensive Guides for Deploying React, Node.js, and General Web Applications on GitHub Pages

Deploying a General Web App (HTML, CSS, JS) on GitHub Pages

A step-by-step guide to deploying web applications (using HTML, CSS, JavaScript) on GitHub Pages, categorized into three main sections for ease of understanding and implementation.

Preparing Your Web Application

  1. Create Your Web Application

    • Prepare your web application with HTML, CSS, and JavaScript files. Ensure the entry point of your app is an index.html file.
  2. Organize Your Application

@Nezteb
Nezteb / jai_and_odin.md
Created September 30, 2023 04:03
A detailed breakdown of @SentientCoffee's opinions on Jai and Odin from the Odin Discord.

what i wish jai had:

  • better "standard library" (odin's core+vendor libraries/jai's compiler modules)

    odin's interface for things is very intuitive and very well designed, it doesn't take long to find what you're looking for, and it's very consistent. for example, strings.builder_make(), strings.builder_init(), strings.builder_destroy(), etc. meanwhile in jai you have things like String_Builder procs: init (which could refer to any number of procs because overloading) print_to_builder, free_buffers/reset, append, etc. (there are more examples like this in other modules.) once you find what you're looking for, it works great, but odin's core library discoverability is top notch (especially with https://pkg.odin-lang.org/ exisiting)

  • slice syntax

jai has "array views" which are exactly like odin slices. but odin's way of handling them with the python syntax makes it 10x more usable, rather than having to use array_view(*view, 0, count) everywhere, and lets you not depend on pointer arithmetic like jai

@BjoernSchilberg
BjoernSchilberg / README.md
Last active December 11, 2024 17:48
Geodaten Geodata OpenData

Geodaten

TopPlusOpen

Das BKG hat ein Kartenproduk erstellt, das in den Bundesländern, in welchen es Open-Data-Datensätze gibt, diese verwendet und in allen anderen Bundesländern auf OSM zurückgreift.

Das BKG als Bundesbehörde hat nur die Rechte an kleinmaßstäblichen Daten (1:200.000 und kleiner), nicht jedoch an den großmaßstäblichen Daten.

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active December 11, 2024 17:48
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname