This file contains hidden or 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
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Next: Server (Dev)", | |
"type": "node", | |
"internalConsoleOptions": "openOnSessionStart", | |
"request": "launch", | |
"cwd": "${workspaceFolder}", | |
"runtimeExecutable": "node", |
This file contains hidden or 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
import requests | |
import json | |
# URL of the Amazon IP ranges JSON file | |
url = "https://ip-ranges.amazonaws.com/ip-ranges.json" | |
# Send a request to get the file | |
response = requests.get(url) | |
# Load the JSON data from the response |
This file contains hidden or 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 ( | |
"image" | |
"image/color" | |
"image/gif" | |
"io" | |
"math" | |
"math/rand" | |
"os" |
This file contains hidden or 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
clone() { | |
return Object.assign(Object.create(Object.getPrototypeOf(this)), this) | |
} |
This file contains hidden or 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
const magicNumber = 3; | |
const dataArray = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]; | |
let index = 0; | |
while (true) { | |
// This is where you get the current item | |
// I'm just printing it but you can do anything | |
console.log(dataArray[index]); |
This file contains hidden or 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
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
export TERM="xterm-256color" | |
# Path to your oh-my-zsh installation. | |
export ZSH=/Users/phil/.oh-my-zsh | |
# Set name of the theme to load. Optionally, if you set this to "random" | |
# it'll load a random theme each time that oh-my-zsh is loaded. |
This file contains hidden or 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
// Change the value of `array` to see how it behaves with defferent sets | |
const array = [0, 1, 2, 3, 4, 5]; | |
// Increase the value of `numberOfLoops` to see more examples | |
const numberOfLoops = 20 | |
console.log("MODULO EXAMPLES"); | |
for (let i = 0; i < numberOfLoops; i++) { | |
let res = array[(i % array.length)]; | |
console.log(`${i} % ${array.length} = ${res}`); |
This file contains hidden or 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
@tailwind base; | |
@tailwind components; | |
@tailwind utilities; |
This file contains hidden or 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
#!/usr/bin/env python3 | |
import sys | |
number_of_args = len(sys.argv) | |
f = open("/etc/hosts", "a+") | |
for i in range(number_of_args - 1): | |
f.write("127.0.0.1 %s\n" % sys.argv[i + 1]) | |
# To use: |
This file contains hidden or 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
var response = { | |
statusCode: 200, | |
headers: { | |
"Access-Control-Allow-Origin": "your-domain.com" | |
} | |
}; |
NewerOlder