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
# SwitchAudio.ps1 | |
# This script toggles the default audio output device between headphones and speakers on a Windows system. | |
# Documentation: | |
# This script uses the AudioDeviceCmdlets PowerShell module to manage audio devices. | |
# It identifies the current default audio device and switches to the other specified device. | |
# Dependencies: AudioDeviceCmdlets module | |
# Step-by-step guide to set up and use this script: |
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
void loop() { | |
int i = 0; | |
// Put DigDug first frame | |
for(int passtime = 0; passtime < 50; passtime++) { | |
FastLED.clear(); | |
for(i; i < NUM_LEDS; i++) { | |
leds[i] = pgm_read_dword(&(Fire01[i])); | |
} | |
FastLED.show(); |
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
// /project/path/src/http/get-index/index.js | |
exports.handler = async function http(request) { | |
return { | |
headers: {'content-type': 'text/html; charset=utf-8;'}, | |
body: '<h1>Hello World! 🎉</h1>' | |
} | |
} |
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
//https://www.youtube.com/watch?v=hVqNwrpCtm4 | |
import { parse } from "https://deno.land/std/flags/mod.ts"; | |
import { TextProtoReader } from "https://deno.land/std/textproto/mod.ts"; | |
import { BufReader } from "https://deno.land/std/io/bufio.ts"; | |
const parsedArgs = parse(Deno.args); | |
async function main() { | |
if (parsedArgs.h || parsedArgs.help || parsedArgs._.length === 0) { | |
console.log("try saying 'hi'"); |
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
export function quote() { | |
let quotes = [ | |
"It's a family that's loaded with grudges and passion. We come from a long line of robbers and highwaymen in Italy, you know. Killers, even.", | |
"To be a good actor you have to be something like a criminal, to be willing to break the rules to strive for something new.", | |
"I think I jump around more when I'm alone.", | |
"I bought a Yamaha-1 and I was doing 180 miles per hour home on the 405 and that's really, really crazy but I did it.", | |
"I believe that being successful means having a balance of success stories across the many areas of your life. You can't truly be considered successful in your business life if your home life is in shambles.", | |
"I always say to myself that if I can make a movie that makes a kid smile or gives them some hope or something to get excited about, then I'm applying myself in the best way that I can. I don't think that just goes for kids. I think that it goes for adults, as well, and for families.", | |
"Passion is very impo |
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
// learn more about HTTP functions here: https://arc.codes/primitives/http | |
exports.handler = async function http (req) { | |
return { | |
headers: {'content-type': 'text/html; charset=utf8'}, | |
body: ` | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> |
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
# example .arc file | |
@app | |
test-app | |
@http | |
get / # home route | |
get /login # login route | |
get /logout # logout route | |
@tables |
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
try { | |
myLove() | |
} | |
catch(feelings) { | |
console.log('oh no') | |
} |
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
const RollingSpider = require('rolling-spider'); | |
const rollingSpider = new RollingSpider(); | |
rollingSpider.connect( function() { | |
rollingSpider.setup( function () { | |
rollingSpider.flatTrim(); | |
rollingSpider.startPing(); | |
rollingSpider.flatTrim(); | |
console.log('Connected to drone ', rollingSpider.name); | |
console.log(rollingSpider.status); |
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
//Server Side Code | |
const io = require('socket.io')(server); | |
io.on('connection', function(socket) { | |
console.log('Your socket id is', socket.id); | |
socket.on('eventName', function doSomething() { | |
console.log('executing doSomething') | |
}) | |
}); |
NewerOlder