Skip to content

Instantly share code, notes, and snippets.

Avatar

Sbe-ng ThePredators

View GitHub Profile
View readme.md

🔥 HomeBrew CheatSheet

Usefull CLI :

# install a dependency
brew install <depencency_name>
# install an app via homebrew
brew install --cask <application_name>

# list tapped repositories
View readme.md

🔥 Python Version Manager (CheatSheet)

Install PyEnv

# 1. Install
brew install pyenv

# 2. export to .zshrc
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc
View readme.md

🔥 Swift (Cheat Sheet)

functions annotation

open

  • An open class is accessible and subclassable outside of the defining module.
  • An open class member is accessible and overridable outside of the defining module.

public

  • A public class is accessible but not subclassable outside of the defining module.
View readme.md

iOS Environment Variables (Swift)

Let's assume in here we have defined Schemes for each environment (dev, recette, production), and we associated each one with a Build Configuration.

Now we want to set Environment data depending on each Build Configuration.

Approach 1 (Runtime Environment Variables)

public enum AppEnvironment {
    case dev
View readme.md
View readme.md

🔥 Docker-Kubernetes-Helm Cheat Sheet

Install Docker

brew install docker

Install Kitematic

brew install --cask kitematic
View readme.md

🔥 SSH Cheat Sheet

SSHPass is a tiny utility, which allows you to provide the ssh password without using the prompt. This will very helpful for scripting. SSHPass is not good to use in multi-user environment. If you use SSHPass on your development machine, it don't do anything evil.

Installing on Ubuntu

apt-get install sshpass

Installing on macOS

View readme.md

DartPad Demo

Just open DartPad and Copy/Paste this code.

import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}
@ThePredators
ThePredators / readme.md
Last active Apr 5, 2021
Alfred CheatSheet
View readme.md