Skip to content

Instantly share code, notes, and snippets.

@cielavenir
cielavenir / readme.md
Last active March 20, 2024 20:18
zoom sandbox-exec for macOS
  1. Download Zoom.pkg from https://zoom.us/download
  2. Extract it using https://www.timdoug.com/unpkg/
  3. Now you have Zoom/zoom.us.app
  4. Launch Zoom by zoom.sh Zoom/zoom.us.app/Contents/MacOS/zoom.us

caveats:

  • Zoom will fail to start meeting for the first time. Just launch again.
  • Zoom will tell that crash happened, but you should ignore it.
@robertpainsi
robertpainsi / commit-message-guidelines.md
Last active May 3, 2024 11:43
Commit message guidelines

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
@arbelt
arbelt / init.lua
Created October 2, 2016 20:55
Hammerspoon config to send escape on short ctrl press
ctrl_table = {
sends_escape = true,
last_mods = {}
}
control_key_timer = hs.timer.delayed.new(0.15, function()
ctrl_table["send_escape"] = false
-- log.i("timer fired")
-- control_key_timer:stop()
end
@novaluke
novaluke / 0-Q&A.md
Last active April 29, 2023 17:23
I want to use Nix for development, but... -- answers to common concerns about Nix

Nix seems perfect for developers - until I try to use it...

Want to use Nix for development but you're not sure how? Concerned about the fluidity of nixpkgs channels or not being able to easily install arbitrary package versions?

When I first heard about Nix it seemed like the perfect tool for a developer. When I tried to actually use it for developing and deploying web apps, though, the pieces just didn't seem to add up.

@Zagrophyte
Zagrophyte / MS15-034Tester.ps1
Last active April 4, 2021 15:58
Sends a CVE-2015-1635 / MS15-034 Request and checks for vulnerability
# Sends a CVE-2015-1635 / MS15-034 Request and checks for vulnerability
function TestMS15_034($hostname, $port)
{
if ($port -eq $null)
{
$port = 80
}
$tc = New-Object Net.Sockets.TcpClient
@Tangent128
Tangent128 / example.js
Last active August 29, 2015 14:09
Async jQuery loader + script dependency resolver. Including this will asynchronously load jQuery, and allow other scripts to register functions to be called once jQuery is available. Importantly, you can safely use the "async" attribute when referencing this script. Dependency resolution is handled by passing the loaded functions an on-demand ge…
// each file needs to start with this to make sure the async array/object exists:
var async = async || [];
// these blocks could be in any order or different files:
async.push(function($, loaded) {
// loaded(name) returns a $.Deferred object, which modules can wait on or resolve as appropriate.
loaded("C").then(function(C) {
console.log("loaded A, needed "+C);
loaded("A").resolve("apple");
});
find $(manpath | tr ':' '\n') -iname '*.1' | xargs cat | (LC_CTYPE=C tr -C '[:alnum:]-_' '\n') | egrep '^--[\-_[:alnum:]]+$' | sort | uniq -c | sort -n
@brucecoddington
brucecoddington / resources.js
Last active June 27, 2020 14:42
Wrapping $resource with api and data services.
angular.module('app.resources', ['ngResource'])
.factory('api', function ($resource) {
var api = {
defaultConfig : {id: '@id'},
extraMethods: {
'update' : {
method: 'PUT'
}
// to compile (using mingw-w64)
// g++ this_filename.c -lole32
// outputs current system volume (out of 0-100) to stdout, ex: output "23"
// mostly gleaned from examples here: http://msdn.microsoft.com/en-us/library/windows/desktop/dd370839(v=vs.85).aspx
// download a compiled version here:
// https://sourceforge.net/projects/mplayer-edl/files/adjust_get_current_system_volume_vista_plus.exe.exe (updated, can set it too now!)
#include <windows.h>
#include <commctrl.h>
#include <mmdeviceapi.h>
#include <endpointvolume.h>
@xaviershay
xaviershay / build_frontend.sh
Last active December 24, 2015 20:49
SASS + Coffee + Concatenation in prod
#!/bin/bash
set -exo pipefail
BUILD_ENV=$1
if [ `uname` == 'Darwin' ]; then
OSX=1
JSCOMPRESSOR="yuicompressor --type js"
else
OSX=