Skip to content

Instantly share code, notes, and snippets.

View sandoche's full-sized avatar

Sandoche ADITTANE sandoche

View GitHub Profile
@sandoche
sandoche / Component.vue
Created August 13, 2019 15:18
Example of a Vue JS file
<template>
<!-- Where your component template goes -->
</template>
<script>
// Where your javascript goes
</script>
<style>
/* Where your CSS goes */
@sandoche
sandoche / Template.vue
Last active October 20, 2019 16:18
A simple template from a NativeScript VueJS app
<template>
<Page @loaded="loaded($event)">
<ActionBar title="About">
<NavigationButton text="Back" icon="res://baseline_arrow_back_white_24" @tap="$navigateBack" />
</ActionBar>
<StackLayout>
<StackLayout class="container">
<Label text="Infinite feed of ideas 💡" textWrap="true" class="description"/>
<Label text="This app has been built with NativeScript Vue for learning purpose (Learning Lab Challenge)" textWrap="true" class="description"/>
</StackLayout>
@sandoche
sandoche / WidgetBuildMethod.dart
Created August 13, 2019 15:05
A simple widget with Flutter
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('About'),
backgroundColor: getAppBarBackground(isDarkTheme)),
body: Container(
margin: const EdgeInsets.all(30.0),
child: Column(
children: <Widget>[
@sandoche
sandoche / Compteur.vue
Created June 6, 2019 09:49
Vuex, with modules, example
// components/Compteur.vue
<template>
<div class="compteur">
<p>{{ valeur }}</p>
<button @click="increment">+</button>
<button @click="decrement">-</button>
<button @click="reset">Reset</button>
<hr>
<input v-model="nombre">
@sandoche
sandoche / main.log
Created December 29, 2018 10:30
Nativescript sidekick logs
[18-12-29 11:28:08.631] (Info) ab.actionsLogger.shell.appVersion - {"name":"NativeScript Sidekick","version":"1.14.1-v.2018.11.23.3"}
[18-12-29 11:28:08.652] (Info) ab.analytics.shell.clientId - No value provided
[18-12-29 11:28:08.672] (Info) ab.appContext.shell.appContext - No value provided
[18-12-29 11:28:08.674] (Info) ab.appContext.shell.projectType - No value provided
[18-12-29 11:28:08.767] (Info) ab.appValidityWatcher.shell.isAppValid - No value provided
[18-12-29 11:28:08.801] (Info) ab.autoUpdate.shell.updates - {"eventName":"checking-for-update","message":"Checking for updates..."}
[18-12-29 11:28:08.838] (Info) ab.buildDeploy.shell.buildConfigChanged - {"platform":null,"buildType":"Cloud","buildConfig":"Debug","isClean":false,"useSharedCloud":false,"webpack":{"isWebpack":false,"env":{"uglify":true,"snapshot":true,"aot":{"debug":false,"release":true},"sourceMap":false}},"isHmr":false}
[18-12-29 11:28:08.847] (Info) ab.buildDeploy.shell.isWebpackSupported - No value provided
[18-12-29 11:28:08.852]
@sandoche
sandoche / main.log
Created December 29, 2018 09:49
Nativescript sidekick logs
[18-12-29 10:01:27.620] (Info) ab.actionsLogger.shell.appVersion - {"name":"NativeScript Sidekick","version":"1.14.1-v.2018.11.23.3"}
[18-12-29 10:01:27.637] (Info) ab.analytics.shell.clientId - No value provided
[18-12-29 10:01:27.666] (Info) ab.appContext.shell.appContext - No value provided
[18-12-29 10:01:27.667] (Info) ab.appContext.shell.projectType - No value provided
[18-12-29 10:01:27.729] (Info) ab.appValidityWatcher.shell.isAppValid - No value provided
[18-12-29 10:01:27.754] (Info) ab.autoUpdate.shell.updates - {"eventName":"checking-for-update","message":"Checking for updates..."}
[18-12-29 10:01:27.787] (Info) ab.buildDeploy.shell.buildConfigChanged - {"platform":null,"buildType":"Cloud","buildConfig":"Debug","isClean":false,"useSharedCloud":false,"webpack":{"isWebpack":false,"env":{"uglify":true,"snapshot":true,"aot":{"debug":false,"release":true},"sourceMap":false}},"isHmr":false}
[18-12-29 10:01:27.799] (Info) ab.buildDeploy.shell.isWebpackSupported - No value provided
[18-12-29 10:01:27.802]
@sandoche
sandoche / package.json
Created December 5, 2018 23:19
GitNews - package.json
{
"name": "gitnews",
"version": "1.0.3",
"description": "Newsfeed of trending github repositories",
"author": "Sandoche Adittane <sandoche@gmail.com>",
"license": "MIT",
"nativescript": {
"id": "com.sandoche.gitnews",
"tns-ios": {
"version": "4.2.0"
@sandoche
sandoche / NativeScript-VueJS-example-4.json
Created November 23, 2018 14:09
Lessons Learned on Writing Apps with NativeScript VueJS - Example 4
{
"news": {
"loading": false,
"error": null,
"retrieved": []
},
"readme": {
"loading": false,
"error": null,
"retrieved": ""
@sandoche
sandoche / NativeScript-VueJS-example-3.js
Created November 23, 2018 14:07
Lessons Learned on Writing Apps with NativeScript VueJS - Example 3
import { isAndroid, isIOS, device } from 'tns-core-modules/platform'
if (isAndroid && device.sdkVersion >= "21") {
// do something
} else if (isIOS) {
// do something else
}
@sandoche
sandoche / NativeScript-VueJS-example-2.vue
Created November 23, 2018 14:05
Lessons Learned on Writing Apps with NativeScript VueJS - Example 2
<style scoped>
ActionBar {
background-color:#fff;
color: #444;
}
ListView {
background-color: #fff;
separator-color: #ccc;
}