Skip to content

Instantly share code, notes, and snippets.

@zoeyronain
zoeyronain / SatisfactoryM1.md
Created June 16, 2023 07:23
Guide to play Satisfactory on M1 with Epic Games Store

Satisfactory owned on Epic Games Store on MacOS with Game-Porting-Toolkit

Both Early Access and Experimental (Update 8) Work. Experimental has a lot of FPS drops and hitches, but it did just launch a few days ago so it's expected. I can hit ~50fps on a fresh world on ultra on Early Access.

Required things:

@jbranigan
jbranigan / index.html
Last active May 25, 2023 18:35
Find the nearest point on a highway to the mouse cursor
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Get nearest highway to the mouse pointer</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
<link href="https://api.mapbox.com/mapbox-gl-js/v1.12.0/mapbox-gl.css" rel="stylesheet" />
<style>
body {
@itsJarrett
itsJarrett / Heli Cam with Locations!
Last active August 21, 2020 13:40
Title says all. Here is a screenshot >> https://i.imgur.com/H1zqgGf.jpg
-- FiveM Heli Cam by mraes, version 1.3 (2017-06-12)
-- Modified by rjross2013 (2017-06-23)
-- Further modified by Loque (2017-08-15) with credits to the following for tips gleaned from their scripts: Guadmaz's Simple Police Searchlight, devilkkw's Speed Camera, nynjardin's Simple Outlaw Alert and IllidanS4's FiveM Entity Iterators.
-- Config
local fov_max = 80.0
local fov_min = 5.0 -- max zoom level (smaller fov is more zoom)
local zoomspeed = 3.0 -- camera zoom speed
local speed_lr = 4.0 -- speed by which the camera pans left-right
local speed_ud = 4.0 -- speed by which the camera pans up-down
@joeytwiddle
joeytwiddle / async-await-forEach-alternatives.md
Last active June 23, 2024 21:19
Do not use forEach with async-await

Do not use forEach with async-await

TLDR: Use for...of instead of forEach() in asynchronous code.

For legacy browsers, use for...i or [].reduce()

To execute the promises in parallel, use Promise.all([].map(...))

The problem

@actionm
actionm / deploy.sh
Created February 28, 2017 19:01
Zero downtime deployment script
# Deployment with zero downtime
# By default keeps 2 last deployments in KEEP_DEPLOYMENTS_DIR and current deployment
# Project domain
PROJECT_NAME=test.com
# Project directory
PROJECT_DIR=/home/forge/test.com
# Deployments directory
KEEP_DEPLOYMENTS_DIR=/home/forge/deploy
@mbostock
mbostock / .block
Last active June 11, 2024 21:02
U.S. Population Density
license:gpl-3.0
height:680
border:no
@aaronwaldon
aaronwaldon / 1) readme.md
Last active March 24, 2023 14:25
How to set up Gulp for Craft CMS. Includes SASS compilation and minification, JavaScript minification, livereloading, and browser sync.

How to set up Gulp with a Craft CMS project

I freaking love working with technologies like Gulp, and wanted to share how to get my current Craft front-end workflow set up. With a few tweaks, this can also be used with virtually any other sites (I've used it with Laravel, static sites, ExpressionEngine, etc).

Project Directory Structure

  • project root/
    • craft/
      • templates/
  • (your craft template files)
@brandondurham
brandondurham / styles.less
Last active June 24, 2024 14:48
Using Operator Mono in Atom
/**
* Using Operator Mono in Atom
*
* 1. Open up Atom Preferences.
* 2. Click the “Open Config Folder” button.
* 3. In the new window’s tree view on the left you should see a file called “styles.less”. Open that up.
* 4. Copy and paste the CSS below into that file. As long as you have Operator Mono SSm installed you should be golden!
* 5. Tweak away.
*
* Theme from the screenshot (http://cdn.typography.com/assets/images/blog/operator_ide2.png):
@cowboy
cowboy / 1-file.txt
Last active May 6, 2024 12:29
Iterate over all lines in a file, handing extra trailing newlines
foo bar
baz
qux
last line (there may or may not be a trailing newline after this line)
@RadGH
RadGH / woocommerce-custom-cart-item-data.php
Last active April 27, 2024 17:25
Get and set custom cart item/product information prior to WooCommerce checkout, and carry those valus over to Order Item Metadata.
<?php
// UPDATE: Stefan from Stack Overflow has explained a better way to handle cart item data.
// See http://stackoverflow.com/a/32327810/470480
// ----------------------
/*
Instructions: