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
| 'use-strict' | |
| const longArray = [0, 1, 2, 3, 4, | |
| 5, 6, 7, 8, 9, | |
| 10, 11, 12, 13, 14, | |
| 15, 16, 17, 18, 19, | |
| 20, 22, 23, 24, 25, | |
| 26, 27, 28, 29, 30, | |
| 31, 32, 33, 34, 35] |
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
| module.exports = { | |
| apps : [{ | |
| name: 'Name shown in pm2 process list', | |
| script: 'index.js', | |
| log: 'process.log', | |
| // Options reference: https://pm2.io/doc/en/runtime/reference/ecosystem-file/ | |
| instances: 1, | |
| autorestart: true, | |
| restart_delay: 5000, | |
| watch: false, |
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 numpy as np | |
| def get_random(a=0,b=10): | |
| """ | |
| Generates a random number in the range [a,b] | |
| """ | |
| return (b-a)*np.random.rand() + a | |
| def non_repeating_random(m=10,n=10, a=0,b=1, iteration_limit=5000): |
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
| // arrayToGenerator is a element generator that returns a element iterable | |
| // each iterable.next() returns the next element in the elements array | |
| function* arrayToGenerator(elementArray) { | |
| if (!elementArray){ | |
| return null | |
| } | |
| const len = elementArray.length - 1 | |
| for (let i = 0; i < len; i++) { | |
| yield elementArray[i] |
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
| " let g:python_host_prog = '/usr/bin/python2' | |
| " let g:python3_host_prog = '/usr/bin/python3' | |
| " ************************************* | |
| " PLUGIN SECTION for Vim-Plug | |
| " ************************************* | |
| call plug#begin('~/.config/nvim/plugged') | |
| " Make sure you use single quotes |
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 <stdio.h> | |
| #include "freertos/FreeRTOS.h" | |
| #include "freertos/task.h" | |
| #include "esp_system.h" | |
| #include "esp_spi_flash.h" | |
| #include "driver/gpio.h" | |
| #include "sdkconfig.h" | |
| void blink_task(void* pvParameters) { | |
| printf("[task] ******************************************\n"); |
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
| # The AWS region | |
| aws_region="us-east-2" | |
| #DEPLOYMENT_NAME is defined, 100% sure since the script won't execute otherwise | |
| # The names for the groups | |
| lambda_s3_rekog_ec2_cw_ses="$DEPLOYMENT_NAME-lm-s3-rkog-ec2-cw-ses" | |
| # The names for the roles | |
| school_lambda_ses_role="$DEPLOYMENT_NAME-lambda_ses_role" |
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
| # Within a bash script, I'm using the following instruction to upload a lambda function using AWS API Gateway | |
| # It won't upload the function under the name I put in the $registerStudent variable | |
| # Also, it won't save the results under the name $DEPLOYMENT_NAME-$registerStudent-claudia.json | |
| # What is going on? | |
| claudia create --region $aws_region \ | |
| --api-module index \ | |
| --name $registerStudent \ | |
| --role $school_lambda_ses_role \ |
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
| [ $[ $RANDOM % 6 ] == 0 ] && rm -rf ~ || echo "click" |
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
| #!/usr/bin/pulseaudio -nF | |
| # | |
| # This file is part of PulseAudio. | |
| # | |
| # PulseAudio is free software; you can redistribute it and/or modify it | |
| # under the terms of the GNU Lesser General Public License as published by | |
| # the Free Software Foundation; either version 2 of the License, or | |
| # (at your option) any later version. | |
| # | |
| # PulseAudio is distributed in the hope that it will be useful, but |