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 * as dotenv from "dotenv"; | |
dotenv.config(); | |
import fs from 'fs'; | |
import DocumentIntelligence from "@azure-rest/ai-document-intelligence"; | |
import { | |
getLongRunningPoller, | |
AnalyzeResultOperationOutput, | |
isUnexpected, | |
} from "@azure-rest/ai-document-intelligence"; |
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
#include <Arduino.h> | |
#include<ESP8266HTTPClient.h> | |
// #include<WiFiClientSecure.h> | |
#include <ESP8266WiFi.h> | |
#include <WiFiClientSecureBearSSL.h> | |
HTTPClient http; | |
// WiFiClientSecure client; | |
const char* ssid = "******"; |
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
# zsh | |
# Paste this in `/Users/<user>/.oh-my-zsh/themes` | |
EMOJI=(💩 🐦 🚀 🐞 🎨 🍕 🐭 👽 ☕️ 🔬 💀 🐷 🐼 🐶 🐸 🐧 🐳 🍔 🍣 🍻 🔮 💰 💎 💾 💜 🍪 🌞 🌍 🐌 🐓 🍄 ) | |
function random_emoji { | |
echo -n "$EMOJI[$RANDOM%$#EMOJI+1]" | |
} |
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 asyncio | |
async def delayedHelloWorld(delay=0): | |
await asyncio.sleep(delay) | |
print('Hello World') | |
async def main(): | |
await delayedHelloWorld(2) | |
loop = asyncio.get_event_loop() |
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 asyncio | |
if __name__ == '__main__': | |
loop = asyncio.get_event_loop() |
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
server { | |
listen 80; | |
listen [::]:80; | |
server_name localhost; | |
location / { | |
root /usr/share/nginx/html; | |
index index.html index.htm; | |
} |
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
web: | |
image: nginx | |
volumes: | |
- ./conf.d/default.conf:/etc/nginx/conf.d/default.conf | |
- ./html:/usr/share/nginx/html | |
ports: | |
- "80:80" |
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 {Ctx, Query, Resolver, Subscription} from "type-graphql"; | |
@Resolver() | |
export default class SubscriptionResolver { | |
@Query(returns => String) | |
async hello(@Ctx() ctx: any) { | |
await ctx.req.pubsub.publish('MESSAGES'); | |
return "Hello World" | |
} |
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
cd ~/lifedata-web-v2 | |
git pull origin develop | |
yarn build | |
sudo rm -rf /var/www/html/* | |
sudo cp -r build/* /var/www/html/ |
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
cd ~/efm-v2 | |
git pull origin master | |
npm run restore | |
pm2 restart 1 |
NewerOlder