You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Instantly share code, notes, and snippets.
🌐
I do it for legacy
Travis Block
travisblock
🌐
I do it for legacy
I'm no longer to active. Feel free to enjoy my work. I leave this to reminisce about my past
Link directly to an open modal window in Bootstrap
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
PHP Class Chainable.Wrapper for convenient chaining methods.
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
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.
examples of SNAT, DNAT with iptables for Advantech, Conel routers, with comments (probably will work on other routers where iptables can be manipulated, care needs to be taken on applying these commands after reboot).
Some examples of SNAT, DNAT with iptables with comments
mainly used in start-up script
How to test 'safely'
When we play with iptables aka firewall we might end up in situation, where we execute rule, which has unforseen impact - lock yourself out. Recovering from this situation is necessity.
How to:
Enable reboot via SMS.
Test all commands in shell first before putting them into Start-up script. This way the command will be wiped out, when unit is rebooted.
[PHP] pengecekan tanggal merah berdasarkan hari libur nasional dan hari minggu
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
Batch convert svg|pdf|eps|emf|wmf|ai|ps|cdr to eps|pdf|png|jpg|tiff|svg|ps|emf|wmf
Batch converter for Windows using Inkscape with the command line
InkscapeBatchConvert is an easy to use solution to quickly convert all files of a folder to another type without the need to open Inkscape. The program uses Windows Batch scripting and will only work on Windows.
Tested with Inkscape 1.0.x - 1.3.x ✅ (The last version that supports Inkscape 0.9.x can be found here)
Usage
Download _InkscapeBatchConvert.bat
Put it in the folder where you have files you wish to convert (will also scan on all subfolders for files of input type).
Examples for how a __toArray() magic method could be useful in PHP.
Examples for how a __toArray() magic method could be useful in PHP.
In a nutshell, __toArray() would not be as useful when you have full control over the entire codebase.
But where __toArray() would be extremely useful is in interfacing with existing code that expects
arrays and wants those arrays to be a specific format. Using classes and type-hinted methods allow to
encapsulate the intelligence into the class, and using __toArray() makes for a nature use-case.