You need the dependencies that go-gl has. That’s a C compiler, and on Debian flavors, the libgl1-mesa-dev package.
Then:
go install github.com/braheezy/bubblelife@v0.1.0
bubblelife
Keybindings
Action
Keybinding
Description
Quit
Esc
Closes the window/application.
Toggle UI menu
Tab
Toggles the visibility of the UI menu.
Navigate UI (down)
Down Arrow
Moves down through UI options.
Navigate UI (up)
Up Arrow
Moves up through UI options.
Adjust Pillar width
Left/Right Arrow (when option 0)
Adjusts the pillar size N (min 2).
Adjust Pillar height
Left/Right Arrow (when option 1)
Adjusts the pillar size M (min 2).
Enter seed
0-9 (when option 2)
Enters numerical input for the seed.
Delete last seed digit
Backspace
Removes the last digit entered for the seed.
Confirm seed
Enter
Confirms the seed input.
Adjust Generation Speed
Left/Right Arrow (when option 3)
Adjusts the generation speed.
Camera movement (forward)
W
Moves the camera forward.
Camera movement (backward)
S
Moves the camera backward.
Camera movement (left)
A
Moves the camera to the left.
Camera movement (right)
D
Moves the camera to the right.
Unlock cursor
Left Shift
Unlocks the cursor and allows free cursor movement.
Design
After completing the LearnOpenGL tutorial series, I wanted my own project to use some of the skills I learned. For graphics concepts, I use:
a cubemap to create the background from. The cubemap is computed and created at runtime from an HDRi image.
instanced rendering of points for good performance. Several other attempts before this tried to render spheres with vertices and there was poor FPS when viewing 2000 bubbles
text rendering! which means opentype font parsing. always tricky
hand-crafted UI system with input handling
Blinn-Phong shading. And the entire sphere is “faked” in the fragment shader
The size of the pillar is chosen and the seed value is used to set the initial alive/dead population state. The Game is then set into motion. To extend to 3D, I check more neighbors than the original rules used for 2D. The Game algorithm does wrapped boundary checking, treating the pillar as a torus essentially.
For fun, related neighbors are given the same color. This is done by selecting cells, doing a BFS search to find neighbors, and labelling that group with an ID to enforce a different random color later. This works out quite nice.
One of restrictions assumed here was to use JDK only but no other 3PP library for the main code.
This impacted a lot of the code (for example we can not use 3PP for parsing JSON so we depend on specific version of JDK).
REQUIREMENTS
I developed this software using Oracle JDK jdk1.8.0_121.
It also passed successful tests with Open JDK 8u111-jdk (as verified in Dockerfile below).
To run this software you need at least Oracle JDK 1.8.0_60, the best is to use latest one available – 1.8.0_100 or higher!
If you use older version then not everything might work because I rely on some latest feature (functions parts of Javascript
scripting engine shipped with JDK) to implement JSON parsing without using any 3PPs.
These are not specific to Oracle JDK, these features are standard features of any JDK implementation.
Usually I would not depend on latest JDK version but in order to avoid writing my own JSON parser I decided to do so.
In order to support older versions of Java I would have to write my own JSON parser, deal with ASTs and different corner cases
and it that itself would easily take me few days to implement.
I chose to depend on JDK 1.8 (and not earlier version of Java) because it has functional features similar to Scala.
Depending on specific version of dependency is not a problem anymore in the world of microservices and containers (Docker)
where every microservice can choose its own dependencies without affecting others as long as APIs it exposes are stable
and versioned.
CONFIGURATION
It is MANDATORY to change first two configuration values in file src/main/resources/mashup.properties
twitter_auth_key (Twitter consumer key)
twitter_auth_secret (Twitter consumer secret)
You have to do this BEFORE building and running software.
Other configuration values can also be modified but this is optional.
HOW TO BUILD SOFTWARE?
Before building software make sure you configured it properly. See previous step.
You have to have Maven 3.3.3 or later in order to build this software. Maven must be available on the PATH.
To build software execute (this will also execute JUnit tests):
mvn clean package
HOW TO RUN SOFTWARE?
To run this software you first have to build it. See previous step.
There are two ways to run this software:
Using Docker on Linux
If you do not want to install specific version of Java then you can run this inside Docker. Assumption is that you have
one of latest Docker version and Linux installed. This software was tested with Docker 1.12 and Ubuntu Linux.
Execute following commands (in the root of project):
./buildDockerImage.sh
./runDockerImage.sh
This will bring you to mashup app where you can enter keywords to be used for searching Github and Twitter APIs.
Not using Docker
Appropriate version of Java must be available on the PATH (see above for required Java version).
If Java is not on the PATH then please modify startMashup.sh script and put absolute path to correct Java binary there.
Execute this to run the application (in the root of project):
./startMashup.sh
If shell scripts can not be executed on your system (maybe you use Windows) simply copy paste command from
startMashup.sh into your terminal (command line).
TESTS
JUnit tests are executed automatically during Maven build.
Ideally there should be much more JUnit tests but I was able to achieve only ~60% of coverage.
Few more hours of work should be done to add extra tests and maybe refactor a thing or two while writing tests.
We would also have to add integration tests and system tests. Those tests would test network failures, problems with DNS, problems with
slow responses from remote dependencies etc. This can be done by mocking dependencies using some kind of embedded Jetty etc.
We would also have to add stress tests, concurrency, stability and reliability tests – but this would make sense mostly if this was not
single-user console only application, like it is today.
If, for example, this application exposed some RESTful APIs to others then we would have to treat it differently than how we treat it now.
POTENTIAL IMPROVEMENTS
Introduce 3PPs and reduce code doing plumbing things like: JSON parsing and conversion, caching, metrics, retries.
Introduce proper monitoring and expose internal metrics. Some 3PPs would be useful to do this or maybe internal libraries in your company.
Introduce proper system testing using Docker and some scripting language (like Groovy)
Introduce some kind of failure injection for more robust system tests (like ChaosMonkey)
Do local performance (and stress) testing and watch how JVM behaves (GC, hotspots etc). Try to optimize most obvious problems. We can use jvisualvm for this.
Use SLF4J for logging for improved performance and richer feature set than what JUL is giving us. Again JUL is used because of limitations of this task
Probably move configuration to Zookeeper or Consul maybe – currently using property files is not flexible enough, especially for distributed systems.
If we decided to move configuration to centralized location then application should fetch its configuration when needed and not only at startup like
it is doing today.
If we decided to use Java only we could implement a lot of crosscutting concerns (like logging or exposing metrics) as annotation-based API so that
it is easier to focus on business logic only. Either use 3PP for this or some internal libraries already available
OTHER THINGS THAT SHOULD BE PART OF PRODUCTION READY SOFTWARE BUT I DID NOT MANAGE TO DO THEM
Documentation, especially if we are exposing APIs remotely or exposing some client library.
This is currently not the case for this project but it could expand.
If we are providing user library then API should be clearly separated (separate jar) from implementation jars.
This library provides the ability to quickly implement the SMS input field. By default it supports the ability to automatically insert OneTimeCode into the field.
Features:
Two default input fields
The ability to make your own design
Ability to animate an input indicator
Ability to handle error state
Installation
CocoaPods
CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate OTPTextField into your Xcode project using CocoaPods, specify it in your Podfile:
pod'SFOTPTextField','~> 1.0.0'
Usage
Default Usage
In order to add a default field:
Create instance of OTPTextField
Add to your ViewController
Implement handlers
Custom Usage
In order to implement cutom field:
Create your own pinView and implement protocol PinContainer
Create your own adapter class and implement protocol OTPTextFieldData
Add instance of OTPTextField to your ViewController
Set your own custom configuration and implement handlers
Php için türkçe gramer yardımcısı İyelik Ekleri
Bu repoda sadece türkçe kullanım için uygun olduğundan metinler türkçedir.
This descriptions turkish language because of lib just for using on turkish language.
Is it worth it to sell your data for just a f*!*ing 1 Euro/Month?
NO.
As you know github is sold to MS. If you don’t want to use it anymore for various reasons, this repo will help you to create your own git server and migrate your repositories from github under 30 mins with a 1 Euro VPS provider. At the end of this, you will have an Let’s Encrypt SSL Certified git service which runs with Nginx Web Server, Go Language and based on Gitea.
Prerequirements:
Own a VPS, We don’t recommend you arubacloud but it is the cheapest VPS(1 Euro/Month), but some process like creating and initializing your VPS sometimes takes over 30 mins, no problem during the running state.
Choose your favorite GNU/Linux distrubition, this documentation explain concept over Ubuntu 16.04 because of it’s simplicity.(Does not mean that Ubuntu is our favourite distribution).
A database server : We prefer Postgresql in this step.
Optional: Own a domain.
Setup:
Connect your VPS over SSH and than sudo apt update && sudo apt upgrade.
Create a user, let’s call it ‘git’, sudo adduser git than sudo adduser git sudo.
Change to that user, sudo - git
After update and upgrade complete, install postgresql with following command sudo apt-get install postgresql postgresql-contrib
After postgresql installation done, install nginx server with following command sudo apt-get install nginx
We are almost done, now lets download the binary for Gitea run the following command wget -O gitea https://dl.gitea.io/gitea/1.3.2/gitea-1.3.2-linux-amd64and be sure that you are in/home/git directory.
After download opperation, give permission to it: chmod +x gitea
After this step, lets make necessity configuration in Nginx, sudo nano /etc/nginx/sites-available/gitserver and paste the following lines with editing <ip_or_domain>(domain adress or public ip adress)
Make a link for sites-enabled directory, to activate vhost file, run following command :sudo ln -s /etc/nginx/sites-available/gitserver /etc/nginx/sites-enabled/
Now we are almost done with nginx configuration, check if you have any syntax error with following command sudo nginx -t.
Let’s create a service for Gitea, run following command: sudo nano /etc/systemd/system/gitea.service paste the following configuration:
After saving the configuration you can restart nginx first, sudo systemctl restart nginx than enable your gitea service by following command: sudo systemctl enable gitea.service and finally sudo systemctl start gitea.service.
Final configuration for postgresql: create postgres user and db for the system. For creating a new postgresql user, run sudo -u postgres psql -c "CREATE USER <yourpostgresusername> WITH PASSWORD '<yourpass>';"
Than run the following command: sudo -i -u postgres
Create a db createdb -O <yourpostgresusername> <yourdbname>
exit
That’s all with PG, don’t forget your: <yourpostgresusername> <yourdbname> <yourpass>
Create Secure Connection With Let’s Encrypt:
Run the following command : sudo add-apt-repository ppa:certbot/certbot
Create a certifiate: sudo certbot --nginx -d <your_domain_or_ip>
Accept answers, than at the end it will ask for:
Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
-------------------------------------------------------------------------------
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
-------------------------------------------------------------------------------
Select the appropriate number [1-2] then [enter] (press 'c' to cancel):
In this case, we generally select 2. But it is your choice.
Gitea web config part
Now go to your domain or your_ip:3000 over a web browser. It will redirect you to your git server installation page, select Postgresql as Database Type in Database Settings, enter necessity informations <yourpostgresusername> <yourdbname> <yourpass>.
Don’t forget to change Application URL in General Application Settings, set it to your domain or your_ip:3000.
And create admin user if you wish, you can also change server and services settings according to your necessity. After all configuration finish, press Install Gitea Button, you will probably see a 404 page. Go to your root domain, that’s it. You have a SSL certified, fast and cheap git server which runs like a charm.
You can also make changes on configuration:
Open app.ini file:
sudo nano /home/git/custom/conf/app.ini
After you are done with changes:
sudo systemctl restart gitea.service
Bonus 0: Your git service has an API! Checkout <yourip:3000_or_yourdomain>/api/swagger
Bonus 1: You can use migrater.py to migrate your project into your new git server!
Donate and Help Us
If you like this work, please star and share it with others 🙂
As Librenotes team we are developing free as in freedom note taking application, checkout Librenotes, any help is appreciated!
BTC > 1HvMriWTMaf1pY3Sak2i1vy5QmEcGMcEgK
ETH > 0xBCa591260D9b0d25eD87dc9B4330980DA44DbB18
Note: under normal circumstances you should not add any styles to .NativeDatepicker__input!
Development
Source files reside in src/. Note that src/index.js is not precompiled in any way; it should remain valid ES5 (no worries, though; this is checked by eslint).