The contents of this article have moved to a new, happier home https://aka.ms/Redis/DataLoss
This file contains hidden or 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
| import multiprocessing | |
| import os | |
| import time | |
| def memory_and_cpu_bomb(): | |
| """Pin the CPU core to 100% AND aggressively flood RAM. | |
| This creates an infinite list of numbers that grows exponentially.""" | |
| print(f"🚀 Core Worker PID {os.getpid()} ignited. Maxing out CPU and eating RAM...") | |
| container = [] |
This file contains hidden or 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
| function makePromise() { | |
| return new Promise(function(resolve, reject){ | |
| setTimeout(function(){ resolve('hey!') }, 500); | |
| }); | |
| } | |
| var gambiwrap = function(p) { | |
| console.log("Promessa não resolvida"); | |
| return p.then(function(r) { |
- Use one-time-bind on expressions ( {{::value}} )
- Replace
$scope.$apply()with$scope.$digest()whenever possible - Move filters to controllers
To get the total watchers on the current page, you can run this script on the browser console:
This file contains hidden or 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
| dc:14:de:8e:d7:c1:15:43:23:82:25:81:d2:59:e8:c0 | 245272 | |
|---|---|---|
| 32:f9:38:a2:39:d0:c5:f5:ba:bd:b7:75:2b:00:f6:ab | 197846 | |
| d0:db:8a:cb:74:c8:37:e4:9e:71:fc:7a:eb:d6:40:81 | 152046 | |
| 34:47:0f:e9:1a:c2:eb:56:eb:cc:58:59:3a:02:80:b6 | 140777 | |
| df:17:d6:57:7a:37:00:7a:87:5e:4e:ed:2f:a3:d5:dd | 91904 | |
| 81:96:a6:8c:3a:75:f3:be:84:5e:cc:99:a7:ab:3e:d9 | 80499 | |
| 7c:a8:25:21:13:a2:eb:00:a6:c1:76:ca:6b:48:6e:bf | 78172 | |
| 1c:1e:29:43:d2:0c:c1:75:40:05:30:03:d4:02:d7:9b | 71851 | |
| 8b:75:88:08:41:78:11:5b:49:68:11:42:64:12:6d:49 | 70786 | |
| c2:77:c8:c5:72:17:e2:5b:4f:a2:4e:e3:04:0c:35:c9 | 68654 |
This file contains hidden or 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
| > Polygons.deny({update: function() { return true; }}); | |
| > p=Polygons.findOne(); | |
| { _id: '74iGubCqxB29ZF2tJ', | |
| geom: | |
| { type: 'Polygon', | |
| coordinates: [ [Object] ], | |
| type2: 'Polygonal' }, | |
| tags: {} } | |
| > Polygons.update({_id: p._id}, {$set: {'geom.type2': 'Polygonify'}}) | |
| 1 |
This file contains hidden or 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
| license: mit |
Configuring Nginx to serve SSL content is straight forward, once you have your certificate and key ready:
server {
listen 443 default ssl;
root /path/to/source;
server_name mydomain;
ssl_certificate /path/to/cert;
ssl_certificate_key /path/to/key;
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 8000NewerOlder