kristofer / What's running on a port?
0 лайк(-ов)
0 форк(-ов)
1 файл(-ов)
Последняя активность
for macOS
To find what's running on Port#
# macos
sudo lsof -i :<PortNumber>
# should return a PID as first number
kill -9 <PID>
kristofer / docker boot.md
0 лайк(-ов)
0 форк(-ов)
1 файл(-ов)
Последняя активность
Get Spring/jhipster running in Docker container
On the mac you'll need to download Docker Desktop
This provides the docker commands on the Mac
Not sure if you need to download and install docker-compose or not....
./mvnw package -Pprod verify jib:dockerBuild
kristofer / Python OOP Sample
0 лайк(-ов)
0 форк(-ов)
1 файл(-ов)
Последняя активность
| 1 | # here is a very simple example of python OOP |
| 2 | |
| 3 | # normal hello-world |
| 4 | print("1 Hello World!") |
| 5 | |
| 6 | # an OOP version |
| 7 | |
| 8 | class HelloWorld: |
| 9 | def main(self): |
| 10 | print("2 Hello World!") |
kristofer / S3 Access (java, Python)
0 лайк(-ов)
0 форк(-ов)
4 файл(-ов)
Последняя активность
Some samples of working with S3 on AWS.
| 1 | import boto3 |
| 2 | from botocore.exceptions import ClientError, NoCredentialsError |
| 3 | import os |
| 4 | from pathlib import Path |
| 5 | |
| 6 | class S3BucketManager: |
| 7 | def __init__(self, bucket_name, region_name='us-east-1'): |
| 8 | """ |
| 9 | Initialize S3 client and set bucket name |
| 10 |
kristofer / Git Tricks
0 лайк(-ов)
0 форк(-ов)
1 файл(-ов)
Последняя активность
For re-doing the repo, to take into account your changes to the .gitignore
Remove Stuff that should ignored. (like class files (java) or .pyc files (python)) Don't Store node_modules either!
The series of commands below will remove all of the items from the Git Index (not from the working directory or local repo), and then updates the Git Index, while respecting git ignores. PS. Index = Cache
First:
git rm -r --cached .
kristofer / Highlight Code for Keynote
0 лайк(-ов)
0 форк(-ов)
1 файл(-ов)
Последняя активность
Highlight Code for Keynote
https://gist.github.com/jimbojsb/1630790
https://medium.com/@bucknall/tricks-for-presenting-code-in-keynote-72f11a1524c2
highlight -O rtf my file.py | pbcopy
kristofer / POM creation
0 лайк(-ов)
0 форк(-ов)
1 файл(-ов)
Последняя активность
create a project structure using Maven (mvn) for Java
mvn archetype:generate -DgroupId=rocks.zipcode -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.5 -DinteractiveMode=false
Maven project creation
kristofer / basic1.bas
0 лайк(-ов)
0 форк(-ов)
1 файл(-ов)
Последняя активность
| 1 | 10 PRINT "Top 10 BASIC Features" |
| 2 | 20 PRINT "1. PRINT - Displays output on the screen" |
| 3 | 30 PRINT "2. LET - Assigns values to variables" |
| 4 | 40 LET myVar = 5 |
| 5 | 50 PRINT "3. INPUT - Gets user input" |
| 6 | 60 INPUT "Enter your name"; name$ |
| 7 | 70 PRINT "Hello ";name$ |
| 8 | 80 PRINT "4. IF/THEN - Makes decisions" |
| 9 | 90 INPUT "Enter a number"; num |
| 10 | 100 IF num > 5 THEN PRINT "The number is greater than 5" |
Новее
Позже