pkill -f fsck
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
import http.server | |
import os | |
import gzip | |
import argparse | |
# Default Constants | |
DEFAULT_PORT = 8123 | |
DEFAULT_BASE_DIR = "./snapshot" | |
DEFAULT_ROUTE = "/snapshot-fast" |
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
#!/usr/bin/python3 | |
from datetime import datetime, timezone | |
from zoneinfo import ZoneInfo | |
import sys | |
def convert_timestamp(input_timestamp): | |
# Determine if the timestamp is in milliseconds or seconds based on its length | |
# Assuming it's in milliseconds if it's greater than 10 digits (a common convention) | |
if len(input_timestamp) > 10: | |
timestamp_seconds = int(input_timestamp) / 1000 |
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
import { chromium } from "playwright"; | |
(async () => { | |
const browser = await chromium.launch({ headless: false }); | |
const page = await browser.newPage(); | |
await page.goto('http://localhost:3000'); | |
const selector = 'div#my-div'; | |
const timeout = 5; | |
const desiredData = page.locator(selector); |
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
#!/usr/bin/env python | |
import base64, hmac, os, hashlib, sys, time, urllib.parse | |
TWENTY_YEARS_IN_SECONDS = 60 * 60 * 24 * 365 * 20 | |
aws_access_key_id = 'AAA' | |
aws_secret_access_key = 'BBB' | |
aws_region='us-west-2' | |
bucket = 'bucket_name' | |
key='another-test.md' |
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
#!/usr/bin/env python3.7 | |
import iterm2 | |
# This script was created with the "basic" environment which does not support adding dependencies | |
# with pip. | |
async def main(connection): | |
# Your code goes here. Here's a bit of example code that adds a tab to the current window: |
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
import zlib | |
import sys | |
print sys.argv | |
if len(sys.argv) > 1: | |
compressed_content = open(sys.argv[1], 'rb').read() | |
decompressed = zlib.decompress(compressed_content) | |
print decompressed | |
else: | |
print 'input file not provided' |
GET _search
{
"query": {
"match_all": {}
}
}
GET /_template
GET /_template/template_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
aws-dev=ssh -i ~/.ssh/aws-dev [email protected] | |
aws-ent=ssh -i ~/.ssh/aws-ent [email protected] | |
aws-prod=ssh -i ~/.ssh/aws-prod [email protected] |
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
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows.Forms; |
NewerOlder