Skip to content

Instantly share code, notes, and snippets.

View eznix86's full-sized avatar
🎯
Focusing

Bruno Bernard eznix86

🎯
Focusing
View GitHub Profile
@AdamJonsson
AdamJonsson / main.dart
Created April 30, 2019 06:32
An example how different widget can be used to expand and collapse content in Flutter
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Expanding Demo',
theme: ThemeData(
@franciscocpg
franciscocpg / README.md
Last active May 20, 2025 02:05
Import mitm certificate to CA in arch linux
  1. After installing mitmproxy run it (just type mitmproxy) in a terminal session and quit. This will create the necessaries certificates files at ~/.mitmproxy.

  2. Extract the certificate to .crt format:
    openssl x509 -in ~/.mitmproxy/mitmproxy-ca.pem -inform PEM -out ca.crt

  3. Trust the certificate into CA:
    sudo trust anchor ca.crt

  4. Run the mitmproxy again

@jakelevi1996
jakelevi1996 / Running TensorFlow Sessions inside sub-processes.md
Last active July 4, 2022 19:13
Running TensorFlow Sessions inside sub-processes

Running TensorFlow Sessions inside sub-processes

In some applications of machine learning/TensorFlow, it is desirable to start multiple processes, and have separate training procedures running concurrently in each of those processes. A useful Python method for achieving this is the multiprocessing.pool.Pool.map() method (or the equivalent starmap() method when the target function takes multiple arguments; see the section "Process Pools" from the description of the multiprocessing module in the Python Library Reference).

The Pool.map() method takes a target-function and a list (or more generally an iterable) of arguments, and returns an equivalent iterable of the results of the function evaluated on each member of the argument-list (which is similar to the [built-in Python function map()

@aceisace
aceisace / Raspberry-AP-Setup.sh
Last active January 2, 2021 19:41 — forked from Lewiscowles1986/rPi3-ap-setup.sh
Raspberry Pi 3 access-point-setup
#!/bin/bash
#
# This version uses Debian Stretch, please use that version.
# Usage: curl -sSL https://gist.githubusercontent.com/aceisace/b53e93924c969ac47e2333e970c132b0/raw/b4fbeed6cbe74d306c1951dc03435b38132b034e/Raspberry-AP-Setup.sh | bash
echo -p "Please enter a SSID for your AP, followed by [ENTER]:"
read APSSID
echo "Your AP will be named $APSSID"
echo -p "Please enter a password for your AP, followed by [ENTER]:"
@hdashk
hdashk / hashDir.go
Last active May 28, 2023 15:05
Method to recursively hash a directory.
package main
import (
"crypto/md5"
"encoding/hex"
"fmt"
"io/ioutil"
"log"
"os"
"path/filepath"
FROM node
RUN mkdir -p /usr/src/app
COPY index.js /usr/src/app
EXPOSE 8080
CMD [ "node", "/usr/src/app/index" ]
@Depender-Sethi
Depender-Sethi / index.html
Created January 20, 2018 17:32
Pure CSS Modal Box
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Desi Developer</title>
<style>
*{
margin: 0;
@ipan
ipan / diff-jq.md
Created January 16, 2018 04:47
compare two JSONs with jq #json #jq
@ruanbekker
ruanbekker / docker-nfs-volumes.md
Created December 10, 2017 10:43
NFS Volumes with Docker Swarm

Create NFS Volumes:

Creating the NFS Volume:

$ docker volume create --driver local \
  --opt type=nfs \
  --opt o=addr=192.168.1.115,uid=1000,gid=1000,rw \
  --opt device=:/mnt/volumes/mysql-test \
  mysql-test-1