Skip to content

Instantly share code, notes, and snippets.

View SC7639's full-sized avatar

Scott Crossan SC7639

View GitHub Profile
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 24, 2024 17:56
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@alok87
alok87 / sendmail.go
Created October 21, 2015 10:10
Sendmail Using Golang without SMTP- Example
package main
import (
"io/ioutil"
"os/exec"
"fmt"
)
// EXAMPLE: echo "Subject: TestnHello" | sendmail -f you@domain.com you@domain.com
// Useful Links: https://gobyexample.com/spawning-processes
@Omranic
Omranic / pwa-serviceworker-data.md
Last active January 31, 2024 18:30
3. Use service workers to cache the forecast data - Your First Progressive Web App
<?php
class BusinessDayPeriodIterator implements \Iterator
{
private $current;
private $period = [];
public function __construct(\DatePeriod $period) {
$this->period = $period;
$this->current = $this->period->getStartDate();
if(!$period->include_start_date){
@shelldandy
shelldandy / App.js
Created October 17, 2017 19:08
nprogress with react-router in create-react-app
import React from 'react'
import { BrowserRouter as Router, Switch } from 'react-router-dom'
import routes from './routes'
import FancyRoute from './components/tools/FancyRoute'
const App = props =>
<Router>
<Switch>
{routes.map((route, i) =>
<FancyRoute key={i} {...route} />
@AmirSoleimani
AmirSoleimani / README.md
Last active December 12, 2018 12:36
Redis Pub/Sub

Redis Publish/Subscribe Sample

Car: Subscriber

Food: Publisher

@valiant-code
valiant-code / IronMon-Rules.md
Last active July 5, 2024 20:32
IronMon Rules

The IronMON Challenge

The IronMon challenge is a Pokémon Randomizer Challenge run created by Iateyourpie. Designed to make experiencing the randomizer fun and challenging, while taking away the wild Pokémon grind that come with some other challenges. It was originally made for Fire Red / Leaf Green but the rules can be applied/adjusted for other games as well. If you're interested to find out more about IronMon, join our Discord community!

IronMon has varying levels of difficulties, to keep it more approachable but also provide the toughest challenge possible for those who want it.

@davidedmundson
davidedmundson / PlasmaNested.sh
Last active July 15, 2024 02:34
Run plasma from within gamescope
#!/bin/sh
# Remove the performance overlay, it meddles with some tasks
unset LD_PRELOAD
## Shadow kwin_wayland_wrapper so that we can pass args to kwin wrapper
## whilst being launched by plasma-session
mkdir $XDG_RUNTIME_DIR/nested_plasma -p
cat <<EOF > $XDG_RUNTIME_DIR/nested_plasma/kwin_wayland_wrapper
#!/bin/sh
@ddwang
ddwang / cursor.sh
Last active July 22, 2024 22:48
Replace `/mnt/c/Users/<USER_NAME>/AppData/Local/Programs/cursor/resources/app/bin/cursor`
#!/usr/bin/env sh
#
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
if [ "$VSCODE_WSL_DEBUG_INFO" = true ]; then
set -x
fi
COMMIT="abd2f3db4bdb28f9e95536dfa84d8479f1eb312d"
APP_NAME="code"
@cheahjs
cheahjs / README.md
Last active February 11, 2024 01:13
Converting PalWorld saves to JSON and back