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
export const UPDATE_EDITOR_CONTENT = 'mock_test/UPDATE_EDITOR_CONTENT'; | |
export const updateMockTestContent = (testId: number, content: string) => ({ | |
type: UPDATE_EDITOR_CONTENT, | |
testId, | |
content, | |
}); | |
handlers[UPDATE_EDITOR_CONTENT] = (state, action) => { | |
const { testId, content } = action; | |
return state | |
.setIn(['tests', 'items', testId, 'answer'], content) |
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
# install libraries | |
sudo apt install git variety build-essential htop python3-pip curl openssh-server screen | |
# install docker dependencies | |
sudo snap install docker | |
sudo groupadd docker | |
sudo usermod -aG docker $USER | |
pip3 install docker-compose | |
snap install kubectl --classic |
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
E.setClock(160); | |
var esp8266 = require("ESP8266"); | |
console.log(esp8266.getState()); | |
pinMode(D4, "output"); | |
var numPixels = 8; | |
var server = "x.x.x.x"; | |
var options = { | |
keep_alive: 60, | |
port: 1883, |
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 condition checks if we're running inside rake assets:precompile | |
if !defined?(::Rake::SprocketsTask) | |
FOG_DIRECTORY = begin | |
# try and see if the directory exists | |
FOG_CONNECTION.directories.get(bucket_name) | |
rescue Excon::Error::Forbidden | |
# otherwise let's just create it | |
FOG_CONNECTION.directories.create( | |
key: bucket_name, | |
public: 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
array = (1..100).map do |num| | |
return "fizzbuzz" if num % 3 == 0 && num % 5 == 0 | |
return "fizz" if num % 3 == 0 | |
return "buzz" if num % 5 == 0 | |
num | |
end | |
puts array |
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
https://forum.arduino.cc/index.php?topic=441428.0 | |
#include "TinyWireS.h" | |
#define I2C_SLAVE_ADDR 0x25 | |
#include "SoftwareSerial.h" | |
const int Rx = 3; // this is physical pin 2 - you do not need to connect this to DFPlayer | |
const int Tx = 4; // this is physical pin 3 - connect to RX pin on DFPlayer | |
SoftwareSerial mySerial(Rx, Tx); |
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
7zip (v:19.00) [main] | |
arduino (v:1.8.10) [extras] | |
audacity (v:2.3.2) [extras] | |
firefox (v:70.0) [extras] | |
git (v:2.23.0.windows.1) [main] | |
hugo-extended (v:0.59.0) [main] | |
kicad (v:5.1.4_1) [extras] | |
nodejs (v:13.0.1) [main] | |
nvm (v:1.1.7) [main] | |
openssh (v:7.6p1) [main] |
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
tap "homebrew/bundle" | |
tap "homebrew/cask" | |
tap "homebrew/cask-fonts" | |
tap "homebrew/core" | |
brew "autoconf" | |
brew "automake" | |
brew "coreutils" | |
brew "libyaml" | |
brew "readline" | |
brew "docker-compose" |
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
# starts postgres | |
docker run --name postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 postgres | |
# starts postgres with timescaledb | |
docker run --name timescaledb -e POSTGRES_PASSWORD=postgres -p 5432:5432 timescale/timescaledb:1.0.0-pg10 |
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
Set-MpPreference -ExclusionPath "$(Resolve-Path '~/')" | |
iex (new-object net.webclient).downloadstring('https://get.scoop.sh') | |
set-executionpolicy unrestricted -s cu | |
setx GOPATH %USERPROFILE%\golib;%USERPROFILE%\go | |
mkdir %USERPROFILE%\golib | |
mkdir %USERPROFILE%\go | |
scoop bucket add extras | |
scoop bucket add java |