Skip to content

Instantly share code, notes, and snippets.

View AlejandroAkbal's full-sized avatar
:octocat:
Focusing

Alejandro Akbal AlejandroAkbal

:octocat:
Focusing
View GitHub Profile
@JamieMason
JamieMason / unfollow.js.md
Last active July 4, 2024 01:52
Unfollow everyone on twitter.com

Unfollow everyone on twitter.com

  1. Go to https://twitter.com/YOUR_USER_NAME/following
  2. Open the Developer Console. (COMMAND+ALT+I on Mac)
  3. Paste this into the Developer Console and run it
// Unfollow everyone on twitter.com, by Jamie Mason (https://twitter.com/fold_left)
// https://gist.github.com/JamieMason/7580315
//
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@Nks
Nks / MediaVideoConverterListener.php
Last active February 15, 2024 02:18
Laravel Media Library converting video to .mp4 after saving
<?php
namespace App\Listeners;
use App\Media;
use FFMpeg\FFMpeg;
use FFMpeg\Format\Video\X264;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\SerializesModels;
@Mygod
Mygod / export-ble-infos.py
Last active June 23, 2024 18:31
Export your Windows Bluetooth LE keys into Linux!
#!/usr/bin/python3
"""
Copyright 2021 Mygod
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
@berkorbay
berkorbay / github_desktop_ubuntu.md
Last active July 4, 2024 19:23
To install Github Desktop for Ubuntu

IMPORTANT

See the following links for further updates to Github Desktop for Ubuntu. These are official instructions. (also mentioned by fetwar on Nov 3, 2023)

For the sake of "maintaining the tradition" here is the updated version.

@rappasoft
rappasoft / laravel-livewire-tables-demo-table.php
Last active April 5, 2024 16:32
Laravel Livewire Tables Demo Table Source
<?php
namespace App\Http\Livewire;
use App\Models\Tag;
use App\Models\User;
use Illuminate\Database\Eloquent\Builder;
use Rappasoft\LaravelLivewireTables\DataTableComponent;
use Rappasoft\LaravelLivewireTables\Views\Columns\BooleanColumn;
use Rappasoft\LaravelLivewireTables\Views\Column;
@davelevine
davelevine / how-to-cache-b2-content-with-cloudflare.md
Last active March 1, 2024 08:04
How to Properly Cache Content Hosted on Backblaze B2 with Cloudflare

How to Properly Cache Content Hosted on Backblaze B2

Summary

Because I use Cloudflare to manage my domains and Backblaze for backups, it only made sense to take advantage of their Bandwidth Alliance for creating my own CDN. This has been incredibly helpful for image hosting for this knowledge base, however, I recently noticed that caching wasn't working as it should.

The Problem

The overall problem started when I was adding a parking page for a domain I recently purchased. The background image was hosted on B2 and the image was supposed to be cached by Cloudflare. However, each time the page loaded, it would pull the image from the origin instead of the cache. I checked this on my knowledge base and found it was doing the same thing.

@ikr4-m
ikr4-m / install.sh
Created June 25, 2022 10:04
Hyper-V Enhanced Session for Debian
#!/bin/sh
# This script based on linux-vm-tools for Ubuntu 22.02.
# Thanks to https://github.com/Hinara/linux-vm-tools/ to script
# This script is for Ubuntu 22.04 Jammy Jellyfish to download and install XRDP+XORGXRDP via
# source.
#
# Major thanks to: http://c-nergy.be/blog/?p=11336 for the tips.
#
@ruionwriting
ruionwriting / README.md
Last active June 19, 2024 17:59
LogiOps configuration for MX Master 3S

LogiOps configuration for MX Master 3S

LogiOps is an amazing projet - please donate.

TL;DR;

I've moved from MacOS (I also use Windows with this mouse) and I wanted to keep most of the behaviors I'm used too. Thinks that didn't work for me:

  • Gestures button dragging left/right switch desktops
  • Hold/release gestures buttom shows all apps in active desktop
@charlesteh
charlesteh / cf-workers-ai-bge-small.js
Last active May 11, 2024 22:45
Cloudflare Workers AI baai/bge-small deployment script
// Made by @charlestehio: https://x.com/charlestehio
// Usage: https://abc.workers.dev/?query=your%20embedding%20query
import { Ai } from './vendor/@cloudflare/ai.js';
export default {
async fetch(request, env) {
// Parse the URL to get query parameters
const url = new URL(request.url);
var query = url.searchParams.get('query');