Skip to content

Instantly share code, notes, and snippets.

View Ir001's full-sized avatar
🚀
Fly to the moon

Irwan Antonio Ir001

🚀
Fly to the moon
View GitHub Profile
// API key
// https://2captcha.com/enterpage
const API_KEY = "XXXX";
// Find site key of a website
const googleSiteKey = document
.getElementsByClassName("g-recaptcha")[0]
.getAttribute("data-sitekey");
// Helper parsing function
@tkardi
tkardi / flightradar.html
Last active April 11, 2023 08:09
Code companion to 'Building a flightradar in Leaflet (pt II)'
<!DOCTYPE html>
<html>
<!-- The following HTML page together with the accompanying
javascript is published under the Unlicense.
SPDX-License-Identifier: Unlicense
-->
<head>
<meta charset="utf-8">
<title>Air traffic map</title>
@hungthai1401
hungthai1401 / BackUpDatabase.php
Created November 2, 2018 09:47
Laravel command backup, restore postgresql database
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Symfony\Component\Process\Process;
use Symfony\Component\Process\Exception\ProcessFailedException;
class BackUpDatabase extends Command
{
@mraaroncruz
mraaroncruz / steps.md
Last active June 9, 2024 06:31
Get the Telegram channel ID

To get the channel id

  1. Create your bot with botfather
  2. Make you bot an admin of your channel

Simplest way (via @anhtuank7c)

Go to Telegram web and open a channel, get the ID from -[channel id] from hash in the path

https://web.telegram.org/k/#-9999999999999

@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active July 3, 2024 17:39
Using multiple github accounts with ssh keys

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
@mul14
mul14 / README.md
Last active February 10, 2023 00:55
Simple Laravel Search Trait

Usage

Put SearchTrait.php in app directory. Then use SearchTrait in your model, like so

use App\SearchTrait;
use Illuminate\Database\Eloquent\Model;

class Article extends Model 
{