Skip to content

Instantly share code, notes, and snippets.

View ahmadalibaloch's full-sized avatar
🎯
Focusing

Ahmad Ali ahmadalibaloch

🎯
Focusing
View GitHub Profile
@thomasdarimont
thomasdarimont / app.py
Last active January 8, 2024 03:21
Example for a simple Python flask webapp that uses Authlib to act as an OpenID Connect client for Keycloak
import json
import os
import certifi
import requests
from authlib.oauth2.rfc6749 import OAuth2Token
from flask import Flask, url_for, session
from flask import render_template, redirect
from authlib.integrations.flask_client import OAuth, token_update
@wiverson
wiverson / modern-hosting-2021.md
Last active February 5, 2024 09:52
List of free hosting services (that also offer options to scale up for $) in 2021

Italics means the text/description is directly from the vendor, usually the slug line on their home page.

Non-italics means it's my comments/editorial.

Static Sites

  • Surge
    • Static web publishing for Front-End Developers
    • Simple, single-command web publishing. Publish HTML, CSS, and JS for free, without leaving the command line.
@Thomas-Ln
Thomas-Ln / install_libffmpeg_for_opera_and_vivaldi.md
Last active February 18, 2024 17:12 — forked from hauke96/libffmpeg_vivaldi.md
Install libffmpeg.so for Vivaldi and Opera

Install libffmpeg.so for Vivaldi and Opera

Troubleshooting videos issues in chromium based browsers

WARNING

Be aware that this manipulation could cause your browser to not launch anymore or make your pages crash !
So be sure to have a backup of your datas before doing it.

Find the chromium version your browser is based on

Goto opera://about or vivaldi://about,
then Ctrl+F to find 'Chrome' in the user-agent,

@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active April 14, 2024 14:51
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

@ahmadalibaloch
ahmadalibaloch / customSetTimeoutAndsetInterval.js
Last active December 7, 2022 07:34
custom setTimeout and setInterval for sandbox environments in browsers (vm-browserify or node-vm)
const setTimeouts = [];
export function customSetTimeout(cb, interval) {
const now = window.performance.now();
const index = setTimeouts.length;
setTimeouts[index] = () => {
cb();
};
setTimeouts[index].active = true;
const handleMessage = (evt) => {
if (evt.data === index) {
@btroncone
btroncone / ngrxintro.md
Last active February 9, 2024 15:37
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

Comprehensive Introduction to @ngrx/store

By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

@tikolakin
tikolakin / fish_alias.md
Last active October 13, 2023 12:51
Create alias in Fish shell and save this as a permanent function

Directly from CLI

alias x='exit'
funcsave x

or create a file in

~/.config/fish/functions 

with name

@jgilfelt
jgilfelt / CurlLoggingInterceptor.java
Created January 9, 2016 15:34
An OkHttp interceptor that logs requests as curl shell commands
/*
* Copyright (C) 2016 Jeff Gilfelt.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@yqritc
yqritc / gist:ccca77dc42f2364777e1
Last active March 29, 2024 10:25
Equal column spacing for Android RecyclerView GridLayoutManager by using custom ItemDecoration

ItemOffsetDecoration

public class ItemOffsetDecoration extends RecyclerView.ItemDecoration {

    private int mItemOffset;

    public ItemOffsetDecoration(int itemOffset) {
        mItemOffset = itemOffset;
    }
@renestalder
renestalder / README.md
Last active April 3, 2024 17:26
Unfollow all on Facebook

Facebook: Unfollow people and pages

See comments section for more up-to-date versions of the script. The original script is from 2014 and will not work as is.

  1. Open news feed preferences on your Facebook menu (browser)
  2. Click people or pages
  3. Scroll down (or click see more) until your full list is loaded
  4. Run the script in your browser console

Facebook will block this feature for you while you use it, depending on how much entities you try to unfollow. It automatically unblocks in a couple of hours and you will be able to continue.