Skip to content

Instantly share code, notes, and snippets.

View basitcodeenv's full-sized avatar
🎯
Focusing

Abdul Basit Rana basitcodeenv

🎯
Focusing
View GitHub Profile
@HappyTiptoe
HappyTiptoe / component.vue
Last active June 13, 2024 04:22
Vue.js composable for consuming Vest suites and receiving reactive references to the result and classes. Written in TypeScript and JavaScript.
<!-- Form.vue -->
<script setup lang="ts">
import { reactive } from 'vue'
import { useSuite } from '~/composables/useSuite'
import { suite } from '~/suites/example'
const { res, classes, validate, reset } = useSuite(suite)
const formData = reactive({
@regstuff
regstuff / Wayback Machine SPN2 API Docs
Created June 21, 2022 09:42
Wayback Machine SPN2 API Docs
From https://docs.google.com/document/d/1Nsv52MvSjbLb2PCpHlat0gkzw0EvtSgpKHu4mk0MnrA/
Save Page Now 2 Public API Docs Draft
Vangelis Banos, updated: 2022-04-05
Capture a web page as it appears now for use as a trusted citation in the future. Changelog: https://docs.google.com/document/d/19RJsRncGUw2qHqGGg9lqYZYf7KKXMDL1Mro5o1Qw6QI/edit#
Contents
Glossary 1
Basic API Reference 1
Capture request 1
@manishtiwari25
manishtiwari25 / country_state.json
Last active May 1, 2025 00:03
List Of Countries With States And Other Useful Information, Updated On 05/01/2025 00:03:58
[
{
"name": "Andorra",
"countryCode": "AD",
"countryCodeAlpha3": "AND",
"phone": "376",
"currency": "EUR",
"flag": "https://www.geonames.org/flags/x/ad.gif",
"symbol": "\u20AC",
"stateProvinces": [
@azhar25git
azhar25git / README.md
Last active February 13, 2024 12:21 — forked from oodavid/README.md
Deploy your site with git (UPDATED: August 2020)

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@imranrbx
imranrbx / CreateResourceController.php
Created July 8, 2020 06:24
With the help of this command you can create a resource controller in CodeIgniter 4 just create a folder named Commands in app folder then create a php file with name CreateResourceController.php and paste the following code.
<?php
namespace App\Commands;
use CodeIgniter\CLI\BaseCommand;
use CodeIgniter\CLI\CLI;
use Config\Services;
/**
With the help of this command you can create a resource controller in CodeIgniter 4.
1) just create a folder named Commands in app folder
2) then create a php file with name CreateResourceController.php
@smashah
smashah / remove_silence.ts
Last active June 3, 2024 08:24
A simple way to remove silences below a certain threshold in an audio file [NODEJS/TS]
//add this to your package.json
// "audio-buffer-utils": "^5.1.2",
// "audio-decode": "^1.4.0",
// "audiobuffer-to-wav": "^1.0.0",
// "node-lame": "^1.2.0",
// "ogg.js": "^0.1.0",
// "opus.js": "^0.1.1",
const fs = require('fs');
@bladeSk
bladeSk / SQLite-PHP-quickstart.php
Last active April 27, 2025 14:31
SQLite3 PHP Quickstart Tutorial
<?php
// This file walks you through the most common features of PHP's SQLite3 API.
// The code is runnable in its entirety and results in an `analytics.sqlite` file.
// Create a new database, if the file doesn't exist and open it for reading/writing.
// The extension of the file is arbitrary.
$db = new SQLite3('analytics.sqlite', SQLITE3_OPEN_CREATE | SQLITE3_OPEN_READWRITE);
// Errors are emitted as warnings by default, enable proper error handling.
@nepsilon
nepsilon / git-change-commit-messages.md
Last active November 19, 2024 18:18
How to change your commit messages in Git? — First published in fullweb.io issue #55

How to change your commit messages in Git?

At some point you’ll find yourself in a situation where you need edit a commit message. That commit might already be pushed or not, be the most recent or burried below 10 other commits, but fear not, git has your back 🙂.

Not pushed + most recent commit:

git commit --amend

This will open your $EDITOR and let you change the message. Continue with your usual git push origin master.

@ksafranski
ksafranski / Common-Currency.json
Last active May 14, 2025 14:33
Common Currency Codes in JSON
{
"USD": {
"symbol": "$",
"name": "US Dollar",
"symbol_native": "$",
"decimal_digits": 2,
"rounding": 0,
"code": "USD",
"name_plural": "US dollars"
},
@keeguon
keeguon / countries.json
Created April 5, 2012 11:11
A list of countries in JSON
[
{name: 'Afghanistan', code: 'AF'},
{name: 'Åland Islands', code: 'AX'},
{name: 'Albania', code: 'AL'},
{name: 'Algeria', code: 'DZ'},
{name: 'American Samoa', code: 'AS'},
{name: 'AndorrA', code: 'AD'},
{name: 'Angola', code: 'AO'},
{name: 'Anguilla', code: 'AI'},
{name: 'Antarctica', code: 'AQ'},