Skip to content

Instantly share code, notes, and snippets.

@hamburghammer
hamburghammer / add_CA_on_linux.md
Last active May 21, 2024 11:48 — forked from kekru/add CA cert on CentOS Debian Ubuntu.md
Add CA cert to local trust store on CentOS, Manjaro, Debian or Ubuntu
  • Open a webpage that uses the CA with Firefox
  • Click the lock-icon in the addressbar -> show information -> show certificate
  • the certificate viewer will open
  • click details and choose the certificate of the certificate-chain, you want to import to CentOS
  • click "Export..." and save it as .crt file
  • Copy the .crt file to /etc/pki/ca-trust/source/anchors on your CentOS machine
  • run update-ca-trust extract
  • test it with wget https://example.com

On Manjaro (arch) the location for the certificates is: /usr/share/ca-certificates/trust-source/anchors (low priority) or /etc/ca-certificates/trust-source/anchors/ (high priority) and the command to update is update-ca-trust extract.

@olegmrzv
olegmrzv / PlayerLoopCleaner.cs
Created April 4, 2024 13:07
PlayerLoop Disable Unity Modules
using System;
using UnityEngine;
using UnityEngine.LowLevel;
using UnityEngine.PlayerLoop;
public static class PlayerLoopCleaner
{
private static readonly Type[] typesToRemove = new Type[] {
typeof(EarlyUpdate.Physics2DEarlyUpdate),
// Physics 2D
@rkuzsma
rkuzsma / gist:0ceefeb3739b96d16b04342cbc5fe54a
Created May 16, 2019 18:10
How to run an old Firefox browser in Docker Ubuntu with VNC
```
docker run -p 6080:80 -v /dev/shm:/dev/shm dorowu/ubuntu-desktop-lxde-vnc
```
Browse to http://127.0.0.1:6080/
In the VNC UI, run the LXTerminal. Paste these commands to install a given version of Firefox. Set `FF_VERS` to the release you want. See available releases at http://releases.mozilla.org/pub/firefox/releases
```
apt-get update && apt-get install wget
@DanPuzey
DanPuzey / Promise.cs
Last active May 21, 2024 11:47
Unity3d: promises for Coroutines
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Promises
{
/// <summary>
/// Contains extension methods that provide promise-like behaviour for coroutines.
/// </summary>
@fredhsu
fredhsu / ubuntudocker.sh
Last active May 21, 2024 11:46
Shell script to install Docker CE on ubuntu and post-install user configuration
#!/bin/bash
sudo apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
@minhoryang
minhoryang / Dockerfile
Last active May 21, 2024 11:46
docker-ubuntu-build-essential
FROM ubuntu:latest
RUN apt-get update
RUN apt-get install -y --no-install-recommends apt-utils build-essential sudo git
RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo
USER docker
@StevenACoffman
StevenACoffman / ttrpg-scenario-design-procedures.md
Last active May 21, 2024 11:45
Tabletop Role Playing Game Scenario Design Recipes

There are a number of different approaches to designing a scenario/adventure/module.

In a Five Room Dungeon, the basic formula is:

  1. Entrance or Guardian
  2. Puzzle or Roleplaying Challenge
  3. Trick or Setback
  4. Climax, Big Battle, or Conflict
  5. Reward, Revelation, or Plot Twist

Justin Alexander's 5+5 Dungeon Recipe:

@KRostyslav
KRostyslav / tsconfig.json
Last active May 21, 2024 11:44
tsconfig.json с комментариями.
// Файл "tsconfig.json":
// - устанавливает корневой каталог проекта TypeScript;
// - выполняет настройку параметров компиляции;
// - устанавливает файлы проекта.
// Присутствие файла "tsconfig.json" в папке указывает TypeScript, что это корневая папка проекта.
// Внутри "tsconfig.json" указываются настройки компилятора TypeScript и корневые файлы проекта.
// Программа компилятора "tsc" ищет файл "tsconfig.json" сначала в папке, где она расположена, затем поднимается выше и ищет в родительских папках согласно их вложенности друг в друга.
// Команда "tsc --project C:\path\to\my\project\folder" берет файл "tsconfig.json" из папки, расположенной по данному пути.
// Файл "tsconfig.json" может быть полностью пустым, тогда компилятор скомпилирует все файлы с настройками заданными по умолчанию.
// Опции компилятора, перечисленные в командной строке перезаписывают собой опции, заданные в файле "tsconfig.json".
@stefansundin
stefansundin / requests_api.py
Last active May 21, 2024 11:41
Reusable class for Python requests library.
# http://docs.python-requests.org/en/master/api/
import requests
class RequestsApi:
def __init__(self, base_url, **kwargs):
self.base_url = base_url
self.session = requests.Session()
for arg in kwargs:
if isinstance(kwargs[arg], dict):
kwargs[arg] = self.__deep_merge(getattr(self.session, arg), kwargs[arg])
@quoha
quoha / Working-With-XCode
Created January 21, 2013 17:58
Using XCode with github
Using XCode with github
=======================
0. These steps were pulled from the documentation on github
1. Create an empty repository on GitHub
do not initialize with a README
2. Note the SSH path to the new repository
git@github.com:quoha/derp-octo-sansa.git