-
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done -
git fetch --all -
git pull -all
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 csv | |
| import typing as t | |
| import requests | |
| PER_PAGE = 250 | |
| MAX_ITERATIONS = 1000 | |
| def fetch_all_data(access_token: str, endpoint: str, search_params: t.Optional[list[str]]) -> list[dict]: | |
| print(f"Fetching data for {endpoint}") |
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
| #!/bin/bash | |
| SOURCE_DIR=/file-syncer/source-dir | |
| DEST_DIR=/file-syncer/des-dir | |
| TODAY=$(date +%Y-%m-%d) | |
| echo "Running file syncer script: ${TODAY}" |
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 { ValidationArguments, ValidatorConstraintInterface } from 'class-validator'; | |
| import { Connection, EntitySchema, FindConditions, ObjectType } from 'typeorm'; | |
| interface UniqueValidationArguments<E> extends ValidationArguments { | |
| constraints: [ | |
| ObjectType<E> | EntitySchema<E> | string, | |
| ((validationArguments: ValidationArguments) => FindConditions<E>) | keyof E, | |
| ]; | |
| } |
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 React from "react"; | |
| import * as mermaid from "mermaid"; | |
| export default class MermaidGraphView extends React.Component { | |
| constructor (props) { | |
| super(props); | |
| this.graphContainer = React.createRef(); |
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
| tloc() { | |
| if [[ "${1}" == "start" ]]; then | |
| echo "Starting Traefik Loc" | |
| docker run -d -p 9999:9999 -p 80:80 -p 443:443 -v /var/run/docker.sock:/var/run/docker.sock:ro --name traefik_loc --restart unless-stopped --network web vujanile/traefik-loc:latest | |
| if [ $? -ne 0 ]; then | |
| docker restart traefik_loc | |
| fi | |
| return 0 | |
| fi | |
| if [[ "${1}" == "restart" ]]; then |
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: "3.7" | |
| services: | |
| wp: | |
| image: wordpress | |
| restart: unless-stopped | |
| volumes: | |
| - ./wp:/var/www/html | |
| ports: | |
| - 8080: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
| brew install bash-completion | |
| brew tap homebrew/completions | |
| cd /usr/local/etc/bash_completion.d | |
| ln -s /Applications/Docker.app/Contents/Resources/etc/docker.bash-completion | |
| ln -s /Applications/Docker.app/Contents/Resources/etc/docker-machine.bash-completion | |
| ln -s /Applications/Docker.app/Contents/Resources/etc/docker-compose.bash-completion |
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
| hidutil property --set '{"UserKeyMapping": [{"HIDKeyboardModifierMappingSrc":0x70000001c, "HIDKeyboardModifierMappingDst":0x70000001d}, {"HIDKeyboardModifierMappingSrc":0x70000001d, "HIDKeyboardModifierMappingDst":0x70000001c}] }' |
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
| curl http://myaddress.loc --silent --write-out "%{size_download}\n" --output /dev/null | |
| curl http://myaddress.loc --silent -H "Accept-Encoding: gzip,deflate" --write-out "%{size_download}\n" --output /dev/null |
NewerOlder