Skip to content

Instantly share code, notes, and snippets.

View limweb's full-sized avatar

Thongchai Lim (样生海) limweb

View GitHub Profile
@limweb
limweb / aab.md
Created December 17, 2024 18:21 — forked from chirag-chhajed/aab.md
Expo APK/AAB Building Tutorial (No EAS Required)

Here's the list with the additional points:

  1. Ensure that you have OpenJDK 17, Android Studio, and its associated tools and NDK (Native Development Kit) installed on your system.

  2. Initialize a new Expo project by executing the following command in your terminal: pnpm create expo-app@latest. This command will prompt you to provide some details about your project, such as the project name and configuration options.

  3. Before building the Android app, you need to prebuild the android directory. Run the command pnpm expo prebuild to generate the necessary files. Additionally, you should provide your app's package name during this step. For example, if your app's package name is com.example.app.

  4. Generate a keystore file. Use an administrator shell to create the keystore. Run the following command: keytool -genkeypair -v -storetype PKCS12 -keystore my-upload-key.keystore -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000 and enter your password (store it safely somewhere) and details.

@limweb
limweb / install-postgresql-9.6-in-ubuntu-16.04.md
Created December 8, 2022 16:26 — forked from ziyan-junaideen/install-postgresql-9.6-in-ubuntu-16.04.md
How to install PostgreSQL 9.6 in Ubuntu 16.04

Background

I believe Ubuntu 16.04 comes with PostgreSQL 9.5. Thats good for a start, but it is a matter of time before you have the need of a PostgreSQL 9.6 cluster. For me it was to import a PG backup from Heroku.

The procedure couldn't have been any easier and is described below. If you are interested in upgrading your old cluster to 9.6 afterwards, you may be interested in this.

Instructions

@limweb
limweb / Aes.php
Created November 10, 2022 07:52 — forked from senowbar/Aes.php
AES encryption and decryption
<?php
class Aes
{
private static $key = 'your_key';
private static $iv = 'your_iv';
public static function encrypt($data)
{
@limweb
limweb / CodeBook.php
Created November 10, 2022 07:51 — forked from comuttun/CodeBook.php
PHP Encrypt Sample with CodeBook.php
<?php
/**
* CodeBook.php
* @version 0.2.1
* @see http://0-oo.net/sbox/php-tool-box/code-book
* @copyright 2009-2011 [email protected]
* @license http://0-oo.net/pryn/MIT_license.txt (The MIT license)
*/
class CodeBook {
/** PKCS#5でパディング */
@limweb
limweb / web-service-soap-client-server-php.md
Created March 23, 2022 13:05 — forked from umidjons/web-service-soap-client-server-php.md
Simple Web service - SOAP Server/Client in PHP

Simple Web service - SOAP Server/Client in PHP

Implementation of the SOAP server - server.php:

<?php
// turn off WSDL caching
ini_set("soap.wsdl_cache_enabled","0");

// model, which uses in web service functions as parameter
@limweb
limweb / php-soap.php
Created March 23, 2022 13:04 — forked from akalongman/php-soap.php
PHP soap client example
ini_set('soap.wsdl_cache_enabled', 0);
ini_set('soap.wsdl_cache_ttl', 900);
ini_set('default_socket_timeout', 15);
$params = array('param1'=>$param1);
$wsdl = 'http://service_url/method?WSDL';
@limweb
limweb / odoo-pgpool.md
Created December 9, 2021 18:45 — forked from akhdaniel/odoo-pgpool.md
Odoo + PGPOOL II

PG+PGPOOL docker compose file

version: '2'

networks:
  my-network:
    driver: bridge
services:
  pg-0:
@limweb
limweb / main.go
Created March 16, 2021 11:00 — forked from yingray/main.go
Golang: aes-256-cbc examples (with iv, blockSize)
package main
import (
"bytes"
"crypto/aes"
"crypto/cipher"
"encoding/hex"
"fmt"
)
@limweb
limweb / Dockerfile
Created February 17, 2021 22:36 — forked from yozik04/Dockerfile
PHP 7 fpm, alpine, mongodb and composer
FROM php:7-fpm-alpine
RUN apk --update add --virtual build-dependencies build-base openssl-dev autoconf \
&& pecl install mongodb \
&& docker-php-ext-enable mongodb \
&& apk del build-dependencies build-base openssl-dev autoconf \
&& rm -rf /var/cache/apk/*
# Time Zone
RUN echo "date.timezone=${PHP_TIMEZONE:-UTC}" > $PHP_INI_DIR/conf.d/date_timezone.ini
@limweb
limweb / gist:ffbb684b047f284e643e0c05671155d3
Created October 13, 2020 18:41 — forked from mhawksey/gist:1442370
Google Apps Script to read JSON and write to sheet
function getJSON(aUrl,sheetname) {
//var sheetname = "test";
//var aUrl = "http://pipes.yahoo.com/pipes/pipe.run?_id=286bbb1d8d30f65b54173b3b752fa4d9&_render=json";
var response = UrlFetchApp.fetch(aUrl); // get feed
var dataAll = JSON.parse(response.getContentText()); //
var data = dataAll.value.items;
for (i in data){
data[i].pubDate = new Date(data[i].pubDate);
data[i].start = data[i].pubDate;
}