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
#!/bin/bash | |
xclip -sel c < $@ |
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
#!/bin/bash | |
$PWD/vendor/bin/sail $@ |
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
# Personal GitHub account | |
Host github.com | |
HostName github.com | |
User git | |
IdentityFile ~/.ssh/id_ed25519_personal | |
# Work GitHub account | |
Host github.com-work | |
HostName github.com | |
User git |
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
/** | |
Instructions: | |
You may just copy the whole code and execute this on the browser console or include this to a node | |
project that has [JSDOM](https://github.com/jsdom/jsdom) to run it in the terminal. | |
Requirements: | |
A node is either a string, or a JS object of the form {"name": "a name", "nodes": [more, nodes]} | |
Write a function in javascript that converts an array of nodes into an unordered list in HTML | |
function mySample(arrayOfNodes) {...; return html} |
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
[/] | |
default='eba4372c-5679-447c-a555-209467495819' | |
list=['eba4372c-5679-447c-a555-209467495819'] | |
[:eba4372c-5679-447c-a555-209467495819] | |
background-color='rgb(34,34,34)' | |
background-transparency-percent=2 | |
foreground-color='rgb(236,236,236)' | |
palette=['rgb(46,52,54)', 'rgb(186,20,20)', 'rgb(78,154,6)', 'rgb(196,160,0)', 'rgb(52,101,164)', 'rgb(117,80,123)', 'rgb(6,152,154)', 'rgb(211,215,207)', 'rgb(85,87,83)', 'rgb(226,87,87)', 'rgb(138,226,52)', 'rgb(252,233,79)', 'rgb(114,159,207)', 'rgb(173,127,168)', 'rgb(52,226,226)', 'rgb(238,238,236)'] | |
use-theme-colors=false |
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 { | |
listen 80; | |
server_name dev.your-app.com; | |
server_tokens off; | |
location / { | |
return 301 https://$host$request_uri; | |
} |
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
from datetime import datetime | |
from collections import namedtuple | |
Range = namedtuple('Range', ['start', 'end']) | |
# Returns a positive number of days overlapping, otherwise, returns 0 | |
def get_days_overlap(r1: Range, r2: Range) -> int: | |
latest_start = max(r1.start, r2.start) | |
earliest_end = min(r1.end, r2.end) |
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
from io import BytesIO | |
import boto3 | |
import pandas as pd | |
from os import environ | |
def convert(bucket, key): | |
s3_client = boto3.client('s3', region_name=environ['REGION']) | |
s3_object = s3_client.get_object(Bucket=bucket, Key=key) |
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
from os import environ | |
import boto3 | |
from mongodb import initialize_connection | |
from pandas import read_csv | |
from operations_writer import OperationsWriter | |
from worklogs_operations_generator import WorklogsOperationsGenerator | |
from worklogs_repository import WorklogsRepository | |
def lambda_handler(event, context): |
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
fastcgi_param APP_NAME "xxx my app"; | |
fastcgi_param APP_ENV "production"; | |
fastcgi_param APP_KEY "base64:gibberish"; | |
fastcgi_param APP_DEBUG false; | |
fastcgi_param APP_URL "https://yourwebsite.com"; | |
fastcgi_param ELASTICSEARCH_ENABLED true; | |
fastcgi_param ELASTICSEARCH_HOSTS "localhost:9200"; | |
fastcgi_param LOG_CHANNEL "stack"; |
NewerOlder