This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Starting ESLint and Prettier setup..." | |
echo "Installing ESLint and Prettier dependencies..." | |
npm i eslint-config-standard eslint-plugin-tailwindcss eslint-config-prettier prettier eslint-plugin-import --save-dev | |
echo "Install ESLint plugin" | |
code --install-extension dbaeumer.vscode-eslint | |
echo "Install Prettier plugin" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Hostinger SSH Deployment | |
on: | |
push: | |
branches: [main] | |
workflow_call: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First, let's implement the graph. This time we'll need to store the neighbors AND the cost for getting to that neighbor. | |
# Start has two neighbors A and B | |
graph = {} | |
graph["start"] = {} | |
graph["start"]["a"] = 6 | |
graph["start"]["b"] = 2 | |
# Graph["start"] is a hash table | |
# Get all the neighbors for start like this |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import deque | |
graph = {} | |
graph["you"] = ["alice", "bob", "claire"] | |
graph["bob"] = ["anuj", "peggy"] | |
graph["alice"] = ["peggy"] | |
graph["claire"] = ["thom", "jonny"] | |
graph["anuj"] = [] | |
graph["peggy"] = [] | |
graph["thom"] = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install and Setup | |
# REPL | |
# VSCode & Extension | |
# 1. Variables / Types |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
contract BikeChain { | |
address owner; | |
constructor() { | |
owner = msg.sender; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: Unlicensed | |
pragma solidity ^0.8.7; | |
contract CryptoKids { | |
// owner DAD | |
address owner; | |
event LogKidFundingReceived(address addr, uint amount, uint contractBalance); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/csv" | |
"encoding/json" | |
"fmt" | |
"os" | |
"time" | |
"github.com/aws/aws-lambda-go/lambda" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pipelines: | |
branches: | |
master: | |
- step: | |
name: Deploy to staging | |
deployment: staging | |
script: | |
- pipe: atlassian/sftp-deploy:0.5.7 | |
variables: | |
USER: $SFTP_USERNAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#ver. 4 | |
##this script will check mysql and apache | |
##if that service is not running | |
##it will start the service and send an email to you | |
##if the restart does not work, it sends an email and then exits | |
##set the path ##this works for Ubuntu 14.04 and 16.04 | |
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin |
NewerOlder