Skip to content

Instantly share code, notes, and snippets.

@ragingwind
ragingwind / IgnoreList
Created Sep 19, 2022
IgnoreList for Resilio Sync
View IgnoreList
# IgnoreList is a UTF-8 encoded .txt file that helps you specify single files, paths and rules
# for ignoring during the synchronization job. It supports "?" and "*" wildcard symbols.
#
#
# OS generated files #
$RECYCLE.BIN
$Recycle.Bin
System Volume Information
ehthumbs.db
desktop.ini
@ragingwind
ragingwind / nginx.conf
Created Aug 5, 2019
Redirect old-classic browser including IE 11
View nginx.conf
worker_processes 1;
events {
worker_connections 1024;
}
http {
map $http_user_agent $outdated {
default 0;
"~MSIE [1-10]\." 1;
@ragingwind
ragingwind / hyper.js
Created Jan 4, 2022
hyper.js for CaskaydiaCove Nerd Font
View hyper.js
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
View .swcrc
{
"jsc": {
"parser": {
"syntax": "ecmascript",
"jsx": false,
"dynamicImport": false,
"privateMethod": false,
"functionBind": false,
"classPrivateProperty": false,
"exportDefaultFrom": false,
View Using-SVG.markdown
View task-switching.scpt
tell application "System Events"
key down {command}
keystroke {tab}
delay 0.2
key up {command}
end tell
@ragingwind
ragingwind / won-as-backquote.sh
Last active Aug 7, 2021
Backquote binding for won key
View won-as-backquote.sh
mkdir -p ~/Library/KeyBindings &&
echo '{ "₩" = ("insertText:", "`"); }' >> ~/Library/KeyBindings/DefaultkeyBinding.dict
@ragingwind
ragingwind / rgb.cpp
Created May 13, 2021
RGB Class for Modern C++
View rgb.cpp
#include <iostream>
#include <string>
#include <map>
#include <cxxabi.h>
class RGB {
public:
using value_type = std::tuple<unsigned, unsigned, unsigned>;
RGB(unsigned r, unsigned g, unsigned b) : m_r(r), m_g(g), m_b(b) {}
@ragingwind
ragingwind / callstack.ts
Created Oct 21, 2020
Callstack for javascript
View callstack.ts
import { sep } from 'path';
function splitPath(filename, level: number) {
const paths = filename.split(sep);
return paths.splice(paths.length - level).join(sep);
}
export function caller(level: number) {
const oldStackTrace = Error.prepareStackTrace;
try {