Skip to content

Instantly share code, notes, and snippets.

View davmixcool's full-sized avatar

David Oti davmixcool

View GitHub Profile
@kacperlukawski
kacperlukawski / qdrant-0.10-multiple-vectors.ipynb
Last active April 24, 2024 18:22
Using multiple vectors in Qdrant 0.10
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@trungdq88
trungdq88 / paddle-revenue.js
Last active April 6, 2023 14:07
A scriptable's script to get Paddle revenue from multiple accounts using puppeteer.
/*
RUN THE SCRIPT BY YOURSELF:
- Run `node paddle-revenue.js` on your server and let it run 24/7.
- Access the API at http://your_server_ip:8175/ (JSON)
HOSTED VERSION:
If you don't want to run the script by your own, you can use the
hosted version. The price is $5 per month per Paddle account.
Here is how:
@lorisleiva
lorisleiva / toSqlWithBindings.php
Last active November 15, 2023 08:54
A little macro to get the SQL from a query builder without the annoying "?".
<?php
use Illuminate\Database\Eloquent\Builder;
Builder::macro('toSqlWithBindings', function () {
$bindings = array_map(
fn ($value) => is_numeric($value) ? $value : "'{$value}'",
$this->getBindings()
);
@davmixcool
davmixcool / countries.php
Created January 19, 2020 22:32
Country Name, Codes, Currency and Symbols
<?php
$countries = array(
array('name' => 'Afghanistan','iso_alpha2' => 'AF','iso_alpha3' => 'AFG','iso_numeric' => '4','calling_code' => '93','currency_code' => 'AFN','currency_name' => 'Afghani','currency_symbol' => '؋'),
array('name' => 'Albania','iso_alpha2' => 'AL','iso_alpha3' => 'ALB','iso_numeric' => '8','calling_code' => '355','currency_code' => 'ALL','currency_name' => 'Lek','currency_symbol' => 'Lek'),
array('name' => 'Algeria','iso_alpha2' => 'DZ','iso_alpha3' => 'DZA','iso_numeric' => '12','calling_code' => '213','currency_code' => 'DZD','currency_name' => 'Dinar','currency_symbol' => ''),
array('name' => 'American Samoa','iso_alpha2' => 'AS','iso_alpha3' => 'ASM','iso_numeric' => '16','calling_code' => '1684','currency_code' => 'USD','currency_name' => 'Dollar','currency_symbol' => '$'),
array('name' => 'Andorra','iso_alpha2' => 'AD','iso_alpha3' => 'AND','iso_numeric' => '20','calling_code' => '376','currency_code' => 'EUR','currency_name' => 'Euro','currency_symbol' => '€'),
array
@talkingnews
talkingnews / ffmpeg_build.sh
Last active June 20, 2024 16:10 — forked from iJackUA/ffmpeg_build.sh
Build ffmpeg and all needed codecs from latest git revisions
#!/bin/bash
sudo apt-get update -qq && sudo apt-get -y install \
autoconf \
automake \
build-essential \
cmake \
git-core \
libass-dev \
libfreetype6-dev \
@aznh
aznh / message-box_01-basic.js
Last active June 8, 2021 09:39
element-ui MessageBox to Dialog
export default {
methods: {
openMessageBox () {
this.$confirm('This will permanently delete the file. Continue?', 'Warning', {
confirmButtonText: 'OK',
cancelButtonText: 'Cancel',
type: 'warning'
}).then(() => {
this.$message({
type: 'success',
@joseluisq
joseluisq / 1README.md
Created April 19, 2017 07:33
How add a custom field to Laravel 5.4 default login. LoginController.php

How add a custom field to Laravel 5.4 default login controller.

In this php example (app/Http/Controllers/Auth/LoginController.php) my model is called Client and the custom field for login validation is status. (Client->status)

Add in your resources/lang/en/auth.php file :

    'failed_status' => 'Your account is inactive yet. Please confirm your e-mail address.',
@nerdenough
nerdenough / vueSetup.md
Last active June 6, 2021 17:21
macOS Setup for Vue

macOS setup for Vue

Install macOS :P

Install Homebrew

Open terminal and run the follow command to install the latest version of Homebrew. This will also install the XCode utils if you don't have them already installed.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

@ahmu83
ahmu83 / US_States_and_Cities.json
Created July 20, 2016 16:50
List of US States and Cities in JSON format.
{
"New York": [
"New York",
"Buffalo",
"Rochester",
"Yonkers",
"Syracuse",
"Albany",
"New Rochelle",
"Mount Vernon",
@eloypnd
eloypnd / dnsmasq_setup_osx.md
Last active June 16, 2024 04:23
wildcard DNS record on OS X in localhost development with dnsmasq

wildcard DNS in localhost development

$ brew install dnsmasq
   ...
$ cp /usr/local/opt/dnsmasq/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf
  • edit /usr/local/etc/dnsmasq.conf
address=/local/127.0.0.1