Skip to content

Instantly share code, notes, and snippets.

View tychota's full-sized avatar
💭
I may be slow to respond.

Tycho Tatitscheff tychota

💭
I may be slow to respond.
View GitHub Profile

Keybase proof

I hereby claim:

  • I am tychota on github.
  • I am tychota (https://keybase.io/tychota) on keybase.
  • I have a public key ASARHtAfDdLOoSq1j4DAUlcY9rhCt1fCtknZcUGFkicR4Ao

To claim this, I am signing this object:

# General
# ------------------------------------------------------------------------------
# DJANGO_READ_DOT_ENV_FILE=True
DJANGO_SETTINGS_MODULE=config.settings.production
# A changer avec https://stackoverflow.com/questions/41298963/is-there-a-function-for-generating-settings-secret-key-in-django
DJANGO_SECRET_KEY=vhLV6oySo7o7umGDTM6IBzlCY4dNagRbqhUuyNgDNbrYRnlHPR089YUI4gVHRng9
# un truc random pour empécher les attaque sur /admin/
DJANGO_ADMIN_URL=admin_S619DgsRTTPQxzV57UgTtwyOqB6NRJm7/
DJANGO_ALLOWED_HOSTS=.roi.balyo.com
@tychota
tychota / machine.js
Created April 7, 2021 12:50
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
const crypto = require("crypto");
const key = crypto.randomBytes(32);
const nonce = crypto.randomBytes(12);
const opts = { authTagLength: 16 };
const cipher = crypto.createCipheriv("chacha20-poly1305", key, nonce, opts);
const plaintext = "Hello World, il se fait tard ce soir.";
@tychota
tychota / machine.js
Last active October 22, 2019 15:18
Generated by XState Viz: https://xstate.js.org/viz
const fetchMachine = Machine({
id: 'user',
initial: 'NotCreated',
context: {},
states: {
NotCreated: {
on: {
CREATE_USER: 'NotAgreedUser',
MIGRATE_USER: 'MigratedUser'
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
import java.security.PublicKey;
import javax.crypto.Cipher;
public class Sample {
@tychota
tychota / 01-createObservableFromDeviceEventEmitter.js
Created December 19, 2018 10:14 — forked from sectore/01-createObservableFromDeviceEventEmitter.js
[React Native + RxJS] Create an Observable from DeviceEventEmitter - An example to handle 'locationUpdated' event
import React, {DeviceEventEmitter} from 'react-native';
import {Observable} from 'rx-lite'
/**
* Creates an Observable to listen to any event of DeviceEventEmitter
* @param type {string} Event type
*/
export default createObservableFromDeviceEventEmitter$ = type => {
let subscription;
return Observable.fromEventPattern(
Color

const test = "test";      

@tychota
tychota / New config
Created April 18, 2018 17:49
Keepalived
! Configuration File for keepalived
global_defs {
router_id LVS_DEVEL
}
vrrp_script check_apiserver {
// ...
}
vrrp_instance VI_1 {
@tychota
tychota / rn-fast-image.diff
Created March 14, 2018 18:28
Diff between fork and upstream
diff --git a/.babelrc b/.babelrc
index 184f5ae..f4fbf13 100644
--- a/.babelrc
+++ b/.babelrc
@@ -1,6 +1,4 @@
{
- "presets": [
- "react-native"
- ]
+"presets": ["react-native"]