Skip to content

Instantly share code, notes, and snippets.

View satujamsaja's full-sized avatar
🏠
Working from home

Deni Saputra satujamsaja

🏠
Working from home
  • Ogilvy Digital Australia
  • Denpasar, Bali, Indonesia
View GitHub Profile
@satujamsaja
satujamsaja / sfml.md
Last active December 26, 2023 23:13
Configure SFML Xcode 10

Download SFML and Setup

  • Download SFML: https://www.sfml-dev.org/download/sfml/2.5.1/ Mac OS Version: Clang - 64-bit (OS X 10.7+, compatible with C++11 and libc++)
  • Extract archive
  • Copy Frameworks and extlibs from source to /Library/Frameworks
  • Copy include/SFML directory from source to /usr/local/include
  • Copy lib/ directory content from source to /usr/local/lib

Install SFML Xcode template

  • Copy templates/SFML from source to : ~/Library/Developer/Xcode/Templates/
@satujamsaja
satujamsaja / Readme.md
Last active April 16, 2019 11:40
Symfony 4 Debian 9 (Stretch)

Requirements

PHP

Install requirement for externall packages

  • $ sudo apt install wget curl ca-certificates apt-transport-https
  • $ sudo wget -q https://packages.sury.org/php/apt.gpg -O- | sudo apt-key add -
  • $ sudo echo "deb https://packages.sury.org/php/ stretch main" | sudo tee /etc/apt/sources.list.d/php.list
  • $ sudo apt update
  • $ sudo apt upgrade
  • $ sudo apt install php7.2
  • $ sudo apt install php7.2-cli php7.2-common php7.2-curl php7.2-mbstring php7.2-mysql php7.2-xml php7.2-zip
@satujamsaja
satujamsaja / 1tutorial.md
Last active April 16, 2019 11:35
Symfony 4 Guard Login Auth

Create Symfony 4 Project

  • $ composer create-project symfony/website-skeleton website

Configure database

  • Configure DATABASE_URL in .env file

Setup security

Create user class

  • $ php bin/console make:user
@satujamsaja
satujamsaja / lightning-composer.json
Last active April 22, 2019 05:08
Update lightning with "little pain"
{
"name": "acquia/blt-project",
"description": "Project template for Drupal 8 sites built with BLT.",
"type": "project",
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"acquia/blt": "^9.2",
"acquia/lightning": "^3.2",
"braintree/braintree_php": "^3.24",
@satujamsaja
satujamsaja / bmp280.ino
Last active October 15, 2018 14:13
Reading pressure, temperature and calculate altitude using BMP280 Barometric pressure sensor with Arduino Uno
/**
* BMP280
* https://www.denislab.com/2018/10/arduino-reading-bmp280-sensor.html
*
*/
#include "Adafruit_BMP280.h"
// Change to your location sea level pressure (Nusa Dua, Bali, Indonesia).
#define SEALEVEL_PRESSURE 1014
@satujamsaja
satujamsaja / dht22.ino
Last active October 11, 2018 15:58
Reading humidity and temperature from DHT22 sensor with Arduino
/**
* DHT22
* https://www.denislab.com/2018/10/arduino-reading-dht22-sensor.html
*/
// Include DHT library
#include "DHT.h"
// Define data pin.
#define DHTPIN 2
@satujamsaja
satujamsaja / taxonomy.feature
Created November 8, 2016 07:53
This is example taxonomy test feature for behat
@api
Feature: Taxonomy test
In order to check taxonomy Blog Category existed
As a site administrator
I need to check taxonomy Blog Category already created
Scenario: Check taxonomy Blog Category existed
Given I am logged in as a user with the "administrator" role
When I go to "/admin/structure/taxonomy"
Then I should see the text "Blog Category"
@satujamsaja
satujamsaja / behat.yml
Created November 8, 2016 07:53
This is example local behat.yml
default:
suites:
default:
contexts:
- FeatureContext
- Drupal\DrupalExtension\Context\DrupalContext
- Drupal\DrupalExtension\Context\MinkContext
- Drupal\DrupalExtension\Context\MessageContext
- Drupal\DrupalExtension\Context\DrushContext
extensions:
@satujamsaja
satujamsaja / behatlocalsetup.txt
Last active November 4, 2022 10:05
Setting up Behat for local testing with Acquia DevDekstop Windows
1. Install Acquia DevDesktop
2. Install, setup and configure new Drupal 8 Site
3. Make sure composer from Acquia DevDesktop working and make use of PHP 5.6
- Modify C:\Program Files (x86)\DevDesktop\tools\composer.bat
- Make modification to @SET PATH=C:\Program Files (x86)\DevDesktop\php5_6;%PATH% php.exe "C:\Program Files (x86)\DevDesktop\tools\composer.phar" %*
- Add C:\Program Files (x86)\DevDesktop\tools to windows Path environtment variable so composer can be executed on command prompt
4. Modify "settings.php" to load database config directly, not from included settings
- Find Acquia DevDesktop settings file on C:\Users\user.name\.acquia\DevDesktop\DrupalSettings
- Find and comment out below line for .inc include. Example below: