Author: Chris Lattner
import 'package:flutter/material.dart'; | |
/// `ThemeExtension` template for custom colors. | |
/// | |
/// For example purposes, it has all required fields from the default Material `ColorScheme`. | |
/// But you can add, rename and delete any fields your need. | |
/// | |
/// ### Motivation | |
/// | |
/// At the beginning, you may not know if your colors will fit into the Material `ColorScheme`, |
import 'package:flutter/material.dart'; | |
extension BuildContextExtensions on BuildContext { | |
ThemeData get theme => Theme.of(this); | |
TextTheme get textTheme => theme.textTheme; | |
ColorScheme get colorScheme => theme.colorScheme; | |
DefaultTextStyle get defaultTextStyle => DefaultTextStyle.of(this); |
defmodule Languafy.Web.Context do | |
@behaviour Plug | |
import Plug.Conn | |
alias Languafy.User | |
def init(opts), do: opts | |
def call(conn, _) do | |
case build_context(conn) do | |
{:ok, context} -> |
UPDATED 3.12.2020
The old version of youtube with "disable_polymer" is not working anymore, so the script also stopped working.
Thanks to JanTheDeveloper we have a new working script. Big up!
I just changed the '//span[contains(text(),"Watch later")]',
to '//span[contains(text(),"Remove from")]',
and it should work for any playlist, not just the watch later one. (thanks to hudsonite for the tip)
setInterval(function () {
document.querySelector('#primary button[aria-label="Action menu"]').click();
Sometimes you want to have a subdirectory on the master
branch be the root directory of a repository’s gh-pages
branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master
branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist
.
Remove the dist
directory from the project’s .gitignore
file (it’s ignored by default by Yeoman).
AWSTemplateFormatVersion: '2010-09-09' | |
Transform: AWS::Serverless-2016-10-31 | |
Description: SAM Template for API Gateway Proxy AppSync | |
Parameters: | |
DomainName: | |
Type: String | |
Stage: | |
Type: String | |
Default: dev |
# Generate a new pgp key: (better to use gpg2 instead of gpg in all below commands) | |
gpg --gen-key | |
# maybe you need some random work in your OS to generate a key. so run this command: `find ./* /home/username -type d | xargs grep some_random_string > /dev/null` | |
# check current keys: | |
gpg --list-secret-keys --keyid-format LONG | |
# See your gpg public key: | |
gpg --armor --export YOUR_KEY_ID | |
# YOUR_KEY_ID is the hash in front of `sec` in previous command. (for example sec 4096R/234FAA343232333 => key id is: 234FAA343232333) |
class _MyHomePageState extends State<MyHomePage> | |
with SingleTickerProviderStateMixin { | |
TabController _tabController; | |
FocusScopeNode _node = FocusScopeNode(); /// <----------------- | |
@override | |
void initState() { | |
_tabController = TabController(length: 3, vsync: this); |
import 'dart:math' as math; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
import 'package:flutter/scheduler.dart'; | |
void main() => runApp(ExampleApp()); | |
class ExampleApp extends StatelessWidget { | |
@override |