Skip to content

Instantly share code, notes, and snippets.

View RWOverdijk's full-sized avatar
🤠
What's going on!?

Roberto Wesley Overdijk RWOverdijk

🤠
What's going on!?
View GitHub Profile
@RWOverdijk
RWOverdijk / steamdeck_ssh_instructions.md
Created February 1, 2024 08:59 — forked from andygeorge/steamdeck_ssh_instructions.md
Steam Deck `ssh` instructions

These are manual instructions on enabling SSH access on your Steam Deck, adding public key authentication, and removing the need for a sudo password for the main user (deck).

This gist assumes the following:

  • you have a Steam Deck
  • you have a home PC with access to a Linux shell that can ssh, ssh-keygen, and ssh-copy-id
  • your Steam Deck and home PC are on the same local network, with standard SSH traffic (tcp/22) allowed over that network from the PC to the Steam Deck

NOTE: @crackelf on reddit mentions that steamOS updates blow away everything other than /home, which may have the following effects:

  • removing the systemd config for sshd.service, which would prevent the service from automatically starting on boot
  • removing the sudoers.d config, which would reenable passwords for sudo
/**
* Hypertext Transfer Protocol (HTTP) response status codes.
*
* @see {@link https://en.wikipedia.org/wiki/List_of_HTTP_status_codes}
*/
export enum HttpStatusCode {
/**
* The server has received the request headers and the client should proceed to send the request body
* (in the case of a request for which a body needs to be sent; for example, a POST request).
@RWOverdijk
RWOverdijk / gist:ac3f8bc1d10b7ec5d864
Last active December 22, 2020 10:12
Enable redis sockets on sails.js
module.exports.sockets = {
// Node.js (and consequently Sails.js) apps scale horizontally.
// It's a powerful, efficient approach, but it involves a tiny bit of planning.
// At scale, you'll want to be able to copy your app onto multiple Sails.js servers
// and throw them behind a load balancer.
//
// One of the big challenges of scaling an application is that these sorts of clustered
// deployments cannot share memory, since they are on physically different machines.
// On top of that, there is no guarantee that a user will "stick" with the same server between
// requests (whether HTTP or sockets), since the load balancer will route each request to the
@RWOverdijk
RWOverdijk / I18n.ts
Created May 20, 2020 08:34
TypeScript: Tiny super basic I18n
class I18n {
public translations: TranslationsInterface;
public locale: string;
constructor(locale: string = '', translations: TranslationsInterface = {}) {
this.translations = translations;
this.locale = locale;
}
declare module 'cloudinary' {
export function config (config: CloudinaryConfig): CloudinaryConfig;
export function config (key: string, value: string): CloudinaryConfig;
export function config (key: string): string;
export const uploader: Uploader;
export type CloudinaryConfig = {
[key: string]: any;
cloud_name: string;
import { AbstractActionController, ContextInterface, inject } from 'stix';
import { dbActions, WetlandService, BodyParamType } from 'stix-wetland';
import { User } from '../Entity/User';
import { compare } from 'bcrypt';
import { AuthService } from '../Service/AuthService/AuthService';
@dbActions(User)
export class UserController extends AbstractActionController {
@inject(WetlandService)
protected wetlandService: WetlandService;
export interface ModuleInterface {
onBootstrap?: (event?: Event<any>) => void | Promise<any>;
getConfig?: (mode?: string) => { [key: string]: any } | Promise<{ [key: string]: any }>;
getServerConfig?: () => { [key: string]: any } | Promise<{ [key: string]: any }>;
getCliConfig?: () => { [key: string]: any } | Promise<{ [key: string]: any }>;
init?: (moduleManager?: ModuleManager) => void;
}

stix-gates

A stix module that allows you to setup enrichers, validators and infinitely more for actions.

What are gates?

Gates are like middleware, but different. They allow you to grant or reject passage. They sit between your router and your action, securing your endpoints. Here's a simplified overview of the flow:

Request---&gt;Router+---&gt;Gates+------&gt;Dispatcher+
if has("syntax")
syntax on
endif
nnoremap tt :tabprevious<CR>
nnoremap tr :tabnext<CR>
nnoremap <C-t> :tabnew .<CR>
set smartindent
set tabstop=4
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'yourapp' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
pod 'Bolts'
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'