Skip to content

Instantly share code, notes, and snippets.

sapher /
Last active June 16, 2023 09:29
Conf WS2
sudo apt-get update -y
sudo apt-get upgrade -y
# Install packages
sudo apt-get install zsh git unzip curl wget build-essential jq file -y
# Install oh-my-zsh
sh -c "$(curl -fsSL"
# Install brew
sapher /
Created November 5, 2022 19:00
crane delete repo
crane delete "${FULL_IMAGE_NAME}@$(crane digest ${FULL_IMAGE_NAME})"

Install and configure External Secret Operator (ESO)

Install external-secret with Helm

helm repo add external-secrets

helm upgrade --install --create-namespace -n eso external-secrets \
    external-secrets/external-secrets \
    -n external-secrets \
sapher /
Created July 15, 2022 16:32
Parse SUPER U monmagasin U ticket
#!/usr/bin/env python3
from asyncore import read
import argparse
from PyPDF2 import PdfReader
import re
import json
if __name__ == "__main__":
import android.content.Context;
import android.content.res.Configuration;
import android.view.OrientationEventListener;
import android.view.Surface;
import android.view.WindowManager;
import java.util.concurrent.locks.ReentrantLock;
sapher / lambda.js
Last active May 25, 2017 04:24
AWS Lambda (use lambda proxy) for registering FCM refresh token to AWS SNS
const AWS = require('aws-sdk');
const SnsClient = new AWS.SNS();
const createEndpoint = (platformAppArn, token, callback) => {
const createParams = {
PlatformApplicationArn: platformAppArn,
Token: token
sapher /
Created February 5, 2017 11:22
Bluetooth with Android +6
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.content.Intent;
import android.os.Build;
import android.util.Log;
import org.androidannotations.annotations.AfterViews;
sapher / template.json
Last active June 3, 2019 04:50 template file for RancherOS
"variables": {
"ros_version" : "v0.5.0",
"iso_md5" : "467caa8394684ba54e8731aed8480652",
"vm_name" : "rancher_image"
"builders": [
"type": "vmware-iso",
"iso_url": "{{ user `ros_version` }}/rancheros.iso",
sapher /
Created May 17, 2016 17:19
Simple Snippet that show how to create a conversion job on AWS ElasticTranscoder
// Create ElasticTranscoderClient
AWSCredentials credentials = new DefaultAWSCredentialsProviderChain().getCredentials();
AmazonElasticTranscoderClient client = new AmazonElasticTranscoderClient(credentials);
// JobInput
JobInput jobInput = new JobInput();
jobInput.setKey(key); // name of the input object in your source S3
// Create JobOuput
sapher / sdl2_window_example.c
Created December 29, 2015 08:41
SDL2 Basic Window code example
#include <stdbool.h>
#include <SDL.h>
int main(int argc, char** argv) {
// Declaration
SDL_Window* window;
SDL_Renderer* renderer;
bool isRunning = true;