Skip to content

Instantly share code, notes, and snippets.

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

Ahmet Simsek indatawetrust

🏠
Working from home
View GitHub Profile
var form = FormApp.create('Örnek Test');
form.setIsQuiz(true);
var item = form.addMultipleChoiceItem();
item.setTitle("Türkiyenin başkenti neresidir?")
.setChoices([
item.createChoice("İstanbul", false),
item.createChoice("Ankara", true),
@indatawetrust
indatawetrust / setup_php.sh
Created May 14, 2019 18:04
PHP 7 and Wordpress Setup
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install ca-certificates apt-transport-https
wget -q https://packages.sury.org/php/apt.gpg -O- | sudo apt-key add -
echo "deb https://packages.sury.org/php/ stretch main" | sudo tee /etc/apt/sources.list.d/php.list
sudo apt-get update
sudo apt-get install php7.2 php7.2-cli php7.2-common php7.2-opcache php7.2-curl php7.2-mbstring php7.2-mysql php7.2-zip php7.2-xml
import {Component} from '@angular/core';
import {NavController, Events} from 'ionic-angular';
import {HttpClient} from '@angular/common/http';
import {Observable} from 'rxjs/Rx';
import { SqliteProvider } from '../../providers/sqlite/sqlite';
@Component({
selector: 'page-home',
templateUrl: 'home.html',
})
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { SQLite, SQLiteObject } from '@ionic-native/sqlite';
/*
Generated class for the SqliteProvider provider.
See https://angular.io/guide/dependency-injection for more info on providers
and Angular DI.
*/
ionic cordova build android --prod --release
rm app-release-unsigned.apk
cp platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk .
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.jks -storepass PASSWORD -keypass PASSWORD app-release-unsigned.apk my-alias
rm HelloWorld.apk
~/Library/Android/sdk/build-tools/24.0.3/zipalign -v 4 app-release-unsigned.apk HelloWorld.apk
@indatawetrust
indatawetrust / Dockerfile
Last active April 10, 2019 16:06 — forked from RinatMullayanov/Dockerfile
Ubuntu Node.js Dockerfile WebRTC
#
# Ubuntu Node.js Dockerfile
#
# https://github.com/dockerfile/ubuntu/blob/master/Dockerfile
# https://docs.docker.com/examples/nodejs_web_app/
#
# Pull base image.
FROM ubuntu:14.04
RUN apt-get update && apt-get install -y apt-transport-https
Array.from(document.querySelectorAll('[message]')).forEach(function(el) {
el.setAttribute('oninvalid', 'this.setCustomValidity("' + el.getAttribute('message') + '")');
el.setAttribute('oninput', 'this.setCustomValidity("")')
})
class Actor {
constructor({state, actions, view}) {
this.state = state
for (let [key, value] of Object.entries(actions)) {
if (typeof value == "function") {
actions[key] = value.bind(this, state)
}
}
Array.prototype.uniq = function(key) {
return key
? this.map(e => e[key])
.map((e, i, final) => final.indexOf(e) === i && i)
.filter(e => this[e])
.map(e => this[e])
: [...new Set(this)];
}
Array.prototype.asyncMap = async function(func) {
@indatawetrust
indatawetrust / gist:cc1b3b1aca36f26e5e183b6f01e155e6
Created March 6, 2019 08:18
Debian (e.g. Ubuntu) Dependencies
apt install gconf-service libasound2 libatk1.0-0 libatk-bridge2.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget