Skip to content

Instantly share code, notes, and snippets.

View ones006's full-sized avatar
🏡
Working from home

Iwan Sunarya ones006

🏡
Working from home
View GitHub Profile
@thomasdarimont
thomasdarimont / docker-compose.yml
Created January 25, 2019 17:52
Docker OpenLDAP + phpldapadmin example
version: '2'
services:
openldap:
image: osixia/openldap:1.2.3
container_name: openldap
environment:
LDAP_LOG_LEVEL: "256"
LDAP_ORGANISATION: "Example Inc."
LDAP_DOMAIN: "example.org"
LDAP_BASE_DN: ""
@matteocrippa
matteocrippa / flutter.md
Last active October 26, 2023 05:47
Flutter Cheatsheet

Flutter

A quick cheatsheet of useful snippet for Flutter

Widget

A widget is the basic type of controller in Flutter Material. There are two type of basic Widget we can extend our classes: StatefulWidget or StatelessWidget.

Stateful

StatefulWidget are all the widget that interally have a dynamic value that can change during usage. It can receive an input value in the constructor or reference to functions. You need to create two classes like:

PHPExcel Cheat Sheet

Documentation

Snippets

Install.

composer require phpoffice/phpexcel
@shark0der
shark0der / setup_mailcatcher.sh
Last active January 22, 2022 16:28 — forked from conroyp/setup_mailcatcher.sh
Mailcatcher installation script for Ubuntu 16.04 (14.04 commands commented out)
#!/bin/bash
# Install dependencies
# older ubuntus
#apt-get install build-essential libsqlite3-dev ruby1.9.1-dev
# xenial
apt install build-essential libsqlite3-dev ruby-dev
# Install the gem
gem install mailcatcher --no-ri --no-rdoc
@mnshankar
mnshankar / nginx.conf
Last active March 16, 2023 11:17
Nginix config for hosting multiple laravel projects in sibling folders.
server {
listen 80;
root /vagrant;
index index.html index.htm index.php app.php app_dev.php;
# Make site accessible from http://set-ip-address.xip.io
server_name 192.168.33.10.xip.io;
access_log /var/log/nginx/vagrant.com-access.log;
error_log /var/log/nginx/vagrant.com-error.log error;
@AnthonyDiGirolamo
AnthonyDiGirolamo / rgb_cpu_usage.c
Last active December 15, 2020 08:48
RGB LED CPU usage on a Raspberry Pi
#include <stdint.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <getopt.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/types.h>
#include <linux/spi/spidev.h>
#include <signal.h>