Skip to content

Instantly share code, notes, and snippets.

View figengungor's full-sized avatar

Figen Güngör figengungor

View GitHub Profile
@jonjack
jonjack / add-update-refresh-github-access-token-on-mac.md
Last active May 1, 2024 02:05
Adding & Updating GitHub Access Token on Mac

Using an Access Token for the first time

Follow the instructions on Github to Create an Access Token in Github

Configure Git to use the osxkeychain

By default, git credentials are not cached so you need to tell Git if you want to avoid having to provide them each time Github requires you to authenticate. On Mac, Git comes with an “osxkeychain” mode, which caches credentials in the secure keychain that’s attached to your system account.

You can tell Git you want to store credentials in the osxkeychain by running the following:-

import 'package:flutter/material.dart';
void main() => runApp(new MaterialApp(home: new app()));
class app extends StatefulWidget {
@override
_appState createState() => new _appState();
}
class _appState extends State<app> {
import 'package:flutter/material.dart';
void main() => runApp(new MaterialApp(home: new app()));
class app extends StatefulWidget {
@override
_appState createState() => new _appState();
}
class _appState extends State<app> {
@slightfoot
slightfoot / ios_android.dart
Created June 30, 2018 14:15
Example of using defaultTargetPlatform to change the entire widget tree based on platform.
import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
void main() {
//runApp(IOSApp());
//runApp(AndroidApp());
runApp(defaultTargetPlatform == TargetPlatform.iOS ? IOSApp() : AndroidApp());
}
// listview in alert dialog error
// https://github.com/flutter/flutter/issues/18108
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
void main() {
runApp(new TestApp());
}
@collinjackson
collinjackson / nested_navigator.dart
Created November 28, 2017 20:07
Nested navigator example
import 'package:flutter/material.dart';
void main() {
runApp(new MaterialApp(
home: new Container(
color: Colors.white,
child: new MyAppHome(),
),
));
}
@jpswade
jpswade / install_adb.sh
Last active December 26, 2023 10:39
Install android on centos
#!/bin/sh
# yum install android-tools -y
yum install java-1.8.0-openjdk-devel
mkdir -p android-sdk-linux
cd android-sdk-linux
# @see https://developer.android.com/studio/index.html
wget --output-document=android-sdk.zip --quiet https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip
unzip android-sdk.zip
rm -f android-sdk.zip
yes | tools/bin/sdkmanager --licenses
@cbeyls
cbeyls / KotlinFunctions.md
Last active June 20, 2022 14:59
Comparison of Kotlin functions: also, apply, let, run, with
Function Function type Target passed as Returns
also Extension it Target
apply Extension this Target
let Extension it Block return value
run Extension this Block return value
with Regular this Block return value
@collinjackson
collinjackson / main.dart
Last active November 29, 2022 06:38
Demonstrates scrolling a focused widget into view
// Copyright 2017, the Flutter project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:async';
import 'package:meta/meta.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
/// A widget that ensures it is always visible when focused.
@luqmanoop
luqmanoop / MainActivity.java
Last active September 13, 2020 21:53
Android Exoplayer demo activity
import android.annotation.SuppressLint;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import com.google.android.exoplayer2.DefaultLoadControl;
import com.google.android.exoplayer2.DefaultRenderersFactory;
import com.google.android.exoplayer2.ExoPlayerFactory;
import com.google.android.exoplayer2.SimpleExoPlayer;