Skip to content

Instantly share code, notes, and snippets.

View suleymanbilgin's full-sized avatar
🎯
Focusing

Suleyman BİLGİN suleymanbilgin

🎯
Focusing
View GitHub Profile
@suleymanbilgin
suleymanbilgin / main.dart
Created October 26, 2020 11:39
flutter GetStorage null
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:storagecont/storage_controller.dart';
void main() {
WidgetsFlutterBinding.ensureInitialized();
StorageController.init().then((value) {
_getSavedLocale();
@suleymanbilgin
suleymanbilgin / asterisk-15
Last active December 10, 2017 01:07
wget
yum update
yum install wget
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-15-current.tar.gz
cd asterisk-15.1.3
contrib/scripts/install_prereq install
# spandsp-devel
yum install libtiff-devel
rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/s/spandsp-0.0.6-0.10.pre21.el7.x86_64.rpm
rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/s/spandsp-devel-0.0.6-0.10.pre21.el7.x86_64.rpm
rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/s/spandsp-apidoc-0.0.6-0.10.pre21.el7.x86_64.rpm
# This is for x64 only
# To check x32 vs x64, run: getconf LONG_BIT
# Tested on Centos x64 - on a FreePBX Distro 13 x64
echo -------
echo This installs opus codec from the Digium website
echo -------
read -rsp $'Press any key to continue OR CTRL-c to QUIT ...\n' -n1 key
cd ~
wget http://downloads.digium.com/pub/telephony/codec_opus/asterisk-13.0/x86-64/codec_opus-13.0_1.1.0-x86_64.tar.gz
/**
* @param realDate your real date -> dd/MM/yyyy
* */
public static String controlDateWithTimestamps(String realDate) {
try {
Long currentTimestamp = System.currentTimeMillis() / 1000;
DateFormat formatter2 = new SimpleDateFormat("dd/MM/yyyy");
Date messageDate = (Date) formatter2.parse(realDate);
Long messageTimestamp = messageDate.getTime() / 1000;