Skip to content

Instantly share code, notes, and snippets.

View olivoil's full-sized avatar

Olivier Melcher olivoil

View GitHub Profile
@olivoil
olivoil / README.md
Created May 27, 2021 16:52 — forked from astamicu/Remove videos from Youtube Watch Later playlist.md
Script to remove all videos from Youtube Watch Later playlist

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();
@olivoil
olivoil / gh-pages-deploy.md
Created March 5, 2021 18:58 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

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.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@olivoil
olivoil / template.yaml
Created May 28, 2020 13:39
API Gateway Proxy AppSync
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
@olivoil
olivoil / git-auto-sign-commits.sh
Created December 28, 2019 21:28 — forked from mort3za/git-auto-sign-commits.sh
Auto sign your git commits
# 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)
@olivoil
olivoil / nextField.dart
Created September 14, 2019 20:18 — forked from escamoteur/nextField.dart
So easy is it now to implement a next field behavior for forms, meaning that the focus is moved as soon the user tabs the next button on the keyboard
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
@olivoil
olivoil / tmux-cheatsheet.markdown
Created December 30, 2018 01:38 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@olivoil
olivoil / pixelbook-linux-setup.md
Created December 20, 2018 22:03 — forked from denolfe/pixelbook-linux-setup.md
Notes on setting up Pixelbook with Linux apps

Pixelbook Linux Setup

Chromebook Configuration [LINK]

  • Switch to dev channel
    • chrome://help in a browser window
    • Click Detailed Build Information
    • Change Channel
    • Select Developer - unstable
  • Wait for Chromebook to download an update then show icon in bottom left
@olivoil
olivoil / pixelbook-dev-setup.md
Created December 20, 2018 22:02 — forked from cassiozen/pixelbook-dev-setup.md
Notes on setting up Pixelbook for development

Pixelbook Setup

Change your channel

Some of the features mentioned in this document only work on the beta or Dev channel. To change your channel:

  1. chrome://help in a browser window
  2. Click Detailed Build Information
  3. Change Channel
  4. Select Beta (Or Dev, if you're feeling adventurous)
@olivoil
olivoil / AppSync-Example.yaml
Created November 25, 2018 20:12 — forked from adrianhall/AppSync-Example.yaml
An example CloudFormation template for AWS AppSync
---
Description: AWSAppSync DynamoDB Example
Resources:
GraphQLApi:
Type: "AWS::AppSync::GraphQLApi"
Properties:
Name: AWSAppSync DynamoDB Example
AuthenticationType: AWS_IAM
PostDynamoDBTableDataSource: