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
@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+
/**
* 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).
# 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'
import React from 'react'
import DropdownAlert from 'react-native-dropdownalert'
import DropdownAlertReduxActions from '../Redux/DropdownAlertRedux'
import I18n from 'react-native-i18n'
import { Colors } from '../Themes'
import { connect } from 'react-redux'
class Dropdown extends React.Component {
dropdown: DropdownAlert
import React from 'react'
import DropdownAlert from 'react-native-dropdownalert'
import DropdownAlertReduxActions from '../Redux/DropdownAlertRedux'
import I18n from 'react-native-i18n'
import { Colors } from '../Themes'
import { connect } from 'react-redux'
class Dropdown extends React.Component {
dropdown: DropdownAlert