Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.
Nowadays lots of companies choose engines like Unreal or Unity for their games (or that's what lot of people think) because d
When using Homebrew (http://brew.sh) and searching formulas or pull requests you may get the dreaded error message: Github API Rate limit exceeded
Let's fix that! (yeah!)
Create a new Personal Token in your Github Account Settings (Sidebar: Applications) and then copy the Token.
In the Terminal, use export HOMEBREW_GITHUB_API_TOKEN=YOURAPITOKENWITHFUNKYNUMBERSHERE (change that to your API Token) or add that to your .bash_profile and then do source .bash_profile.
| cd ~/Library/Android/sdk/platform-tools/ | |
| # Get the hash of the mitmproxy-ca certificate. | |
| openssl x509 -inform PEM -subject_hash_old -in ~/.mitmproxy/mitmproxy-ca.pem | head -1 | |
| # We will use this hash value, append '.0' (dot zero) and use this as the filename for the resulting Android certificate | |
| cat ~/.mitmproxy/mitmproxy-ca.pem > c8750f0d.0 | |
| openssl x509 -inform PEM -text -in ~/.mitmproxy/mitmproxy-ca.pem -out /dev/null >> c8750f0d.0 | |
| # In an other terminal, we will start the emulator with writable /system volume |
| #!/usr/bin/python3 | |
| # -*- coding: utf-8 -*- | |
| from PyQt5.QtCore import Qt | |
| from PyQt5.QtGui import QImage, QPixmap, QPalette, QPainter | |
| from PyQt5.QtPrintSupport import QPrintDialog, QPrinter | |
| from PyQt5.QtWidgets import QLabel, QSizePolicy, QScrollArea, QMessageBox, QMainWindow, QMenu, QAction, \ | |
| qApp, QFileDialog | |
| int fit = false; | |
| this->testLabel->setText(""); | |
| QLabel *myLabel = this->testLabel; | |
| QFont myFont = myLabel->font(); | |
| QString str = "this is the new string. this is the new string. this is the new string. super long. don't fit. please please please overflow the box"; | |
| while (!fit) | |
| { |
| var mediaJSON = { "categories" : [ { "name" : "Movies", | |
| "videos" : [ | |
| { "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
| "sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ], | |
| "subtitle" : "By Blender Foundation", | |
| "thumb" : "images/BigBuckBunny.jpg", | |
| "title" : "Big Buck Bunny" | |
| }, | |
| { "description" : "The first Blender Open Movie from 2006", | |
| "sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ], |
| ffmpeg -ss $INPUT_START_TIME -t $LENGTH -i $INPUT_FILENAME \ | |
| -vf "fps=$OUTPUT_FPS,scale=$OUTPUT_WIDTH:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" \ | |
| -loop $NUMBER_OF_LOOPS $OUTPUT_FILENAME | |
| # Change these placeholders: | |
| # * $INPUT_START_TIME - number of seconds in the input video to start from. | |
| # * $LENGTH - number of seconds to convert from the input video. | |
| # * $INPUT_FILENAME - path to the input video. | |
| # * $OUTPUT_FPS - ouput frames per second. Start with `10`. | |
| # * $OUTPUT_WIDTH - output width in pixels. Aspect ratio is maintained. |
| #include <stdio.h> | |
| #include <netinet/in.h> | |
| #include <stdlib.h> | |
| #include <sys/socket.h> | |
| #define PORT 8080 | |
| #define SA struct sockaddr | |
| int main() | |
| { | |
| int sockfd, connfd, len; |
| /** | |
| * An [Observer] for [Event]s, simplifying the pattern of checking if the [Event]'s content has | |
| * already been handled. | |
| * | |
| * [onEventUnhandledContent] is *only* called if the [Event]'s contents has not been handled. | |
| */ | |
| class EventObserver<T>(private val onEventUnhandledContent: (T) -> Unit) : Observer<Event<T>> { | |
| override fun onChanged(event: Event<T>?) { | |
| event?.getContentIfNotHandled()?.let { value -> | |
| onEventUnhandledContent(value) |