This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array.from(document.querySelectorAll('[message]')).forEach(function(el) { | |
el.setAttribute('oninvalid', 'this.setCustomValidity("' + el.getAttribute('message') + '")'); | |
el.setAttribute('oninput', 'this.setCustomValidity("")') | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
} | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |