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 | |
| /* instead using this headers | |
| header('Content-type: application/octet-stream'); | |
| header('Content-Disposition: attachment; filename="'.$filename.'"'); | |
| // use this headers */ | |
| header("Content-type: application/pdf"); | |
| header("Content-Length: ".$length); | |
| header("Content-Disposition: inline; filename=\"".$filename."\""); |
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
| bye; | |
| # from: http://superuser.com/questions/1081539/delete-files-with-same-size-but-keep-always-one-file | |
| # find the files to keep | |
| find . -type f -printf "%s %p\n" | grep "zip" | sort -n | uniq -d --check-chars=10 > files.txt | |
| # here it goes! | |
| mkdir unique |
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 callAjax(url, callback) { | |
| var xmlhttp; | |
| xmlhttp = new XMLHttpRequest(); | |
| xmlhttp.onreadystatechange = function () { | |
| if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { | |
| callback(JSON.parse(xmlhttp.responseText)); | |
| } | |
| } | |
| xmlhttp.open('GET', url, true); | |
| xmlhttp.send(); |
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
| convert -density 300 test.svg -colorspace CMYK -profile colorProfiles/ISOcoated_v2_eci.icc out8.pdf |
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 lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Are you online?</title> | |
| <style> | |
| body { | |
| color: #fff; | |
| font-family: sans-serif; |
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
| $$('.collectionChildren .collectionItem').forEach(function(e) {console.log(e.getAttribute('id').replace("sharedfile_", "ServerSubscribedWorkshopItems=")) }) |
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 getGIF(tag, id) { | |
| document.title = tag.replace('yes', 'ja').replace('no', 'nein').toUpperCase(); // set doc title | |
| superagent // call giphy api | |
| .get('http://api.giphy.com/v1/gifs/random?api_key=dc6zaTOxFJmzC&tag=' + tag) | |
| .set('Accept', 'application/json') | |
| .end(function(err, res) { | |
| if (err || !res.ok) { | |
| console.error('API call failed.'); | |
| console.log(err); |
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
| #!/bin/bash | |
| #command to manually start if you want to close this script (do it in screen) | |
| #xvfb-run --auto-servernum --server-args='-screen 0 640x480x24:32' wine RustDedicated.exe -batchmode +rcon.ip 0.0.0.0 +rcon.port "48000" +rcon.password killer +server.hostname "-LINUX RUST-US-Pro Admins-NO WIPE-NEWBS WELCOM-" +server.port "28015" +server.identity "nfo_rust_server1" +server.maxplayers "2000" | |
| ##################################################################################### | |
| # Linux script for Rust server installing. # | |
| # Can also be used to update Rust server and steamcmd. # | |
| # Starts a rust server at the end. # | |
| # # | |
| # If you use a sudoers file please execute this command first to get root access: # | |
| # sudo -s # |
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
| setInterval(function() { | |
| timestamps = document.querySelectorAll('time'); | |
| Array.prototype.forEach.call(timestamps, function(el) { | |
| el.innerHTML = el.getAttribute('datetime') | |
| }); | |
| }, 1); |