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
puts “Enter an integer: “ | |
num = gets | |
puts “You entered: #{num}” |
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
#include <stdio.h> | |
int main() | |
{ | |
int number; | |
printf("Enter an integer: "); | |
scanf("%d", &number); | |
printf("You entered: %d", number); | |
return 0; | |
} |
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
const int knobPin = 3; | |
const int onButtonPin = 2; | |
const int relayPin = 4; | |
const int potPin = 2; //analog | |
int onButtonState = 0; | |
int potVal; | |
bool onState; | |
int hertz; |
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/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew install zsh | |
brew install wget | |
brew install crystal | |
brew install [email protected] | |
brew install composer | |
composer global require weprovide/valet-plus |
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
sudo apt-get update; | |
sudo apt-get install php7.2; | |
sudo apt-get install php7.2-mbstring; | |
sudo apt-get install php7.2-zip; | |
//install composer and move to bin directory. | |
composer install --no-dev; | |
cp .env.example .env; | |
php artisan key:generate; |
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
sudo git reset --hard origin/master; sudo git pull origin master; | |
#nosudo | |
git reset --hard origin/master; git pull origin master; |
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
# ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.42.zip | |
# extract and cd into the directory | |
./configure --enable-utf8 --enable-unicode-properties | |
make | |
sudo make install |
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
# Build executable normally | |
shards build --release | |
# See dependant libraries | |
otool -L bin/EXECUTABLE | |
# Install any the static libs that are required | |
brew reinstall -s libgc | |
brew reinstall -s libevent |
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
abstract class Animal | |
abstract def speak | |
end | |
class Dog < Animal | |
def speak | |
"Bark!" | |
end | |
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
// PatternDecoder.ts | |
export class PatternDecoder { | |
private prefix: string; | |
private splitter: string; | |
private startIndex: number | string; | |
private currentIndex: number | string; |
OlderNewer