Skip to content

Instantly share code, notes, and snippets.

View eznix86's full-sized avatar
🎯
Focusing

Bruno Bernard eznix86

🎯
Focusing
View GitHub Profile
@eznix86
eznix86 / .gitlab-ci.yml
Created December 21, 2019 21:47
Flutter gitlab pipeline
image: openjdk:8-jdk
variables:
ANDROID_COMPILE_SDK: "28"
ANDROID_BUILD_TOOLS: "28.0.2"
ANDROID_SDK_TOOLS: "4333796"
FLUTTER_VERSION: "https://storage.googleapis.com/flutter_infra/releases/stable/linux/flutter_linux_v1.12.13+hotfix.5-stable.tar.xz"
before_script:
- apt-get --quiet update --yes
FROM node
RUN mkdir -p /usr/src/app
COPY index.js /usr/src/app
EXPOSE 8080
CMD [ "node", "/usr/src/app/index" ]
@eznix86
eznix86 / app.js
Created October 9, 2019 20:06 — forked from joshnuss/app.js
Express.js role-based permissions middleware
// the main app file
import express from "express";
import loadDb from "./loadDb"; // dummy middleware to load db (sets request.db)
import authenticate from "./authentication"; // middleware for doing authentication
import permit from "./permission"; // middleware for checking if user's role is permitted to make request
const app = express(),
api = express.Router();
// first middleware will setup db connection
@eznix86
eznix86 / main.dart
Created July 6, 2019 11:10 — forked from AdamJonsson/main.dart
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(
@eznix86
eznix86 / android-screen-to-gif.sh
Last active April 2, 2019 14:15 — forked from lorenzos/android-screen-to-gif.sh
Captures screen from Android device via ADB and makes a high quality GIF
#!/bin/bash
# based on http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html
#
# How to install:
# Install adb
# sudo apt-get install ffmpeg
# wget https://gist.github.com/theArtechnology/d012fdb3e46166cb1f92b81a1d956535/raw/android-screen-to-gif.sh
# chmod a+x android-screen-to-gif.sh
/* PAGINATION WITH SORTING AND PAGING */
const page = 1; // input page, min value 1
const limit = 2; // input limit min value 1
/* INPUT ARRAY */
const array = [
{ Editable: true, Name: "Daniel Test", Site: "SE100"},
{ Editable: true, Name: "Test new", Site: "SE100"},
{ Editable: false, Name: "Test", Site: "SE100"},
];