Skip to content

Instantly share code, notes, and snippets.

View jukefr's full-sized avatar
🌈
be the inspiration you want to see in the world, beat up a fascist :)

memory leak jukefr

🌈
be the inspiration you want to see in the world, beat up a fascist :)
View GitHub Profile
@camullen
camullen / installation.md
Created December 10, 2022 23:52
KDE Install on WSL2
@FliegendeWurst
FliegendeWurst / droidcam.nix
Last active February 25, 2021 09:38 — forked from gtgteq/droidcam.nix
droidcam.nix
{ stdenv, fetchzip, pkgconfig, ffmpeg, gtk2-x11, libjpeg }:
stdenv.mkDerivation rec {
pname = "droidcam";
version = "0";
src = fetchzip {
url = "https://github.com/aramg/droidcam/archive/03d6de8d5628663c75a6e266c4ae6a26a2bbe682.zip";
sha256 = "05kd5ihwb3fldmalv67jgpw4x0z0q39lfis69r7yh03qiqlviymk";
};
@DjinnGA
DjinnGA / prepare-iso.sh
Last active April 4, 2021 01:59
Convert MacOS 10.14 Mojave Beta Installer App To iso File
#!/bin/bash
hdiutil create -o /tmp/Mojave.cdr -size 8g -layout SPUD -fs HFS+J
hdiutil attach /tmp/Mojave.cdr.dmg -noverify -mountpoint /Volumes/install_build
sudo /Applications/Install\ macOS\ 10.14\ Beta.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build
mv /tmp/Mojave.cdr.dmg ~/Desktop/InstallSystem.dmg
hdiutil detach /Volumes/Install\ macOS\ 10.14\ Beta
hdiutil convert ~/Desktop/InstallSystem.dmg -format UDTO -o ~/Desktop/Mojave.iso
@rstacruz
rstacruz / README.md
Last active November 11, 2020 09:00
Prettier-eslint on Spacemacs

Setting up automatic Eslint formatting on Spacemacs

Note: This assumes that your project already has a working eslint setup!

Step 1: add prettier-eslint_d

prettier-eslint_d is a "daemon" versions of prettier and eslint. They are faster frontends to prettier and eslint, great for editors. Add it to your project via Yarn:

# prettier-eslint_d are replacements for these packages; if you have them,
@yukimochi
yukimochi / Caddyfile.caddy1
Last active June 30, 2024 03:03
For Mastodon Caddy Setting file. (Based on official Nginx configuration example) [Last Update: Mar 07, 2021]
https://yourdomain.example.com/ {
log / /var/log/caddy/mastodon.log "{combined}" {
rotate_age 90
}
root /home/mastodon/live/public
gzip
header / {
Strict-Transport-Security "max-age=31536000"
}
@onnimonni
onnimonni / rename-uploads.php
Created February 25, 2016 14:20
Remove accents from Wordpress uploads. This renames all files and replaces corresponding attachment in WordPress database. You probably use linux in production and might run OS X in development. This helps to avoid possible problems with filenames. To avoid this in future install mu-plugin which hooks in 'sanitize_file_name'
<?php
/*
* Replace-uploads.php
* This replaces all accents from your uploads
* you can run this with wp-cli: $ wp eval-file replace-uploads.php
*/
/**
* cd to right path before changes
*/

This is unmaintained, please visit Ben-PH/spacemacs-cheatsheet

Useful Spacemacs commands

  • SPC q q - quit
  • SPC w / - split window vertically
  • SPC w - - split window horizontally
  • SPC 1 - switch to window 1
  • SPC 2 - switch to window 2
  • SPC w c - delete current window
@adam-p
adam-p / Local PR test and merge.md
Last active August 3, 2024 16:45
Testing a pull request, then merging locally; and avoiding TOCTOU

It's not immediately obvious how to pull down the code for a PR and test it locally. But it's pretty easy. (This assumes you have a remote for the main repo named upstream.)

Getting the PR code

  1. Make note of the PR number. For example, Rod's latest is PR #37: Psiphon-Labs/psiphon-tunnel-core#37

  2. Fetch the PR's pseudo-branch (or bookmark or rev pointer whatever the word is), and give it a local branch name. Here we'll name it pr37:

$ git fetch upstream pull/37/head:pr37
@nikcub
nikcub / README.md
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007
@aheckmann
aheckmann / storeImgInMongoWithMongoose.js
Created April 17, 2012 19:14
store/display an image in mongodb using mongoose/express
/**
* Module dependencies
*/
var express = require('express');
var fs = require('fs');
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
// img path