Skip to content

Instantly share code, notes, and snippets.

View ultrasamad's full-sized avatar
🎯
Focusing

Samad Ibrahim ultrasamad

🎯
Focusing
View GitHub Profile
@ruanbekker
ruanbekker / awscli_v2_ubuntu.md
Created February 23, 2021 12:29
Install AWS CLI Version 2 on Ubuntu 20
$ apt update
$ apt search awscli
$ apt install curl wget unzip -y
$ curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
$ unzip awscliv2.zip
$ ./aws/install
$ aws --version
aws-cli/2.1.28 Python/3.8.8 Linux/4.19.121-linuxkit exe/x86_64.ubuntu.20 prompt/off
@javedbaloch4
javedbaloch4 / Tabs.html
Last active June 6, 2023 23:42
Switching tabs using AlpineJS & TailwindCSS
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Home</title>
<script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.6.0/dist/alpine.min.js" defer></script>
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">
<link rel="stylesheet" href="">
@GussRw
GussRw / laravel.yml
Last active June 9, 2024 21:10
GitHub Action for Laravel with MySQL
# GitHub Action for Laravel with MySQL
name: Testing Laravel with MySQL
on: [push, pull_request]
jobs:
laravel:
name: Laravel (PHP ${{ matrix.php-versions }})
runs-on: ubuntu-latest
env:
DB_DATABASE: laravel
DB_USERNAME: root
@Akryum
Akryum / List.vue
Created December 15, 2019 14:40
Vue - onScrollBottom composable function
<script>
import { ref } from '@vue/composition-api'
import { onScrollBottom } from '@/scroll'
export default {
setup () {
function loadMore () {
// ...
}
@JoeCrescoll
JoeCrescoll / after.sh
Last active May 16, 2024 06:11
Installs PostGIS extension on a Homestead box and enables it on a specific PostgreSQL database.
#!/bin/bash
# If you would like to do some extra provisioning you may
# add any commands you wish to this file and they will
# be run after the Homestead machine is provisioned.
#
# If you have user-specific configurations you would like
# to apply, you may also create user-customizations.sh,
# which will be run after this script.
@asialgearoid
asialgearoid / main.dart
Created May 30, 2018 03:32
Flutter Todo App Final Code
// Import MaterialApp and other widgets which we can use to quickly create a material app
import 'package:flutter/material.dart';
// Code written in Dart starts exectuting from the main function. runApp is part of
// Flutter, and requires the component which will be our app's container. In Flutter,
// every component is known as a "widget".
void main() => runApp(new TodoApp());
// Every component in Flutter is a widget, even the whole app itself
class TodoApp extends StatelessWidget {
@thijskok
thijskok / config.yml
Last active April 4, 2023 05:47
CircleCI 2.0 Laravel build configuration with PHP 7.1, NodeJS, and MySQL support. Runs both PHPunit as well as Laravel Dusk. Proper GD configuration for image editing purposes. Several linters included (requires including them in composer / package.json).
version: 2
jobs:
build:
working_directory: ~/user/repo
environment:
BASH_ENV: ~/.bashrc
docker:
@GhazanfarMir
GhazanfarMir / Instructions.sh
Last active May 14, 2024 03:26
Install PHP7.2 NGINX and PHP7.2-FPM on Ubuntu 16.04
########## Install NGINX ##############
# Install software-properties-common package to give us add-apt-repository package
sudo apt-get install -y software-properties-common
# Install latest nginx version from community maintained ppa
sudo add-apt-repository ppa:nginx/stable
# Update packages after adding ppa
@javilobo8
javilobo8 / download-file.js
Last active July 25, 2024 17:30
Download files with AJAX (axios)
axios({
url: 'http://localhost:5000/static/example.pdf',
method: 'GET',
responseType: 'blob', // important
}).then((response) => {
const url = window.URL.createObjectURL(new Blob([response.data]));
const link = document.createElement('a');
link.href = url;
link.setAttribute('download', 'file.pdf');
document.body.appendChild(link);
@aNd1coder
aNd1coder / vagrant-homestead-php7-redis.sh
Last active September 19, 2019 12:57
Installing PHP REDIS PHP7 Branch On Fresh Install Homestead PHP7 Branch
vagrant@homestead:~$ sudo apt-get update
vagrant@homestead:~$ git clone -b php7 https://github.com/phpredis/phpredis.git
vagrant@homestead:~$ sudo mv phpredis/ /etc/
vagrant@homestead:~$ cd /etc/phpredis
vagrant@homestead:/etc/phpredis$ phpize
vagrant@homestead:/etc/phpredis$ ./configure
vagrant@homestead:/etc/phpredis$ make && make install
# Note This is an Extension You Need to Enable to Make it Work in Php 7
# This First Command Will Allow You To Call PHPREDIS Facade in Browser