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
| #Spider Websites with Wget – 20 Practical Examples | |
| Wget is extremely powerful, but like with most other command line programs, the plethora of options it supports can be intimidating to new users. Thus what we have here are a collection of wget commands that you can use to accomplish common tasks from downloading single files to mirroring entire websites. It will help if you can read through the wget manual but for the busy souls, these commands are ready to execute. | |
| 1. Download a single file from the Internet | |
| wget http://example.com/file.iso | |
| 2. Download a file but save it locally under a different name | |
| wget ‐‐output-document=filename.html example.com |
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
| ######################################################################## | |
| # OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2018 | |
| ######################################################################## | |
| # ---------------------------------------------------------------------- | |
| # Rewrite from HTTP to HTTPS - if you want to use it, comment it out | |
| # ---------------------------------------------------------------------- |
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 (history, trackingId, options) { | |
| const getParameterByName = (paramName) => { | |
| var searchString = window.location.search.substring(1), | |
| i, val, params = searchString.split("&"); | |
| for (i=0;i<params.length;i++) { | |
| val = params[i].split("="); | |
| if (val[0] == paramName) { | |
| return val[1] || undefined; | |
| } | |
| } |
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
| using Google.Apis.AnalyticsReporting.v4; | |
| using Google.Apis.Auth.OAuth2; | |
| using Google.Apis.Services; | |
| using System; | |
| using System.IO; | |
| using System.Security.Cryptography.X509Certificates; | |
| namespace GoogleAnaltyics.V4 | |
| { | |
| public class ServiceAccountJson |
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/sh | |
| #Check the Drive Space Used by Cached Files | |
| du -sh /var/cache/apt/archives | |
| #Clean all the log file | |
| #for logs in `find /var/log -type f`; do > $logs; done | |
| logs=`find /var/log -type f` | |
| for i in $logs |
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
| location ~* ^/images/.+\.(png|jpg)$ { | |
| root /home/www-data; | |
| add_header Vary Accept; | |
| try_files "${uri}.webp" $uri =404; |
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
| using System; | |
| using System.Diagnostics; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| // based on https://gist.github.com/AlexMAS/276eed492bc989e13dcce7c78b9e179d | |
| public static class ProcessAsyncHelper | |
| { | |
| public static async Task<ProcessResult> RunProcessAsync(string command, string arguments, int timeout) | |
| { |
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
| public static class Program | |
| { | |
| private static readonly string[] Arrays = new[] | |
| { | |
| "jerry", | |
| "Kate", | |
| "Steve", | |
| "Mark", | |
| "Joe" | |
| }; |
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
| /* Modern Font Stacks */ | |
| /* System */ | |
| font-family: system, -apple-system, ".SFNSText-Regular", "San Francisco", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif; | |
| /* Times New Roman-based serif */ | |
| font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif; | |
| /* A modern Georgia-based serif */ | |
| font-family: Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif", "Bitstream Vera Serif", "Liberation Serif", Georgia, 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
| -- Remove the history from | |
| rm -rf .git | |
| -- recreate the repos from the current content only | |
| git init | |
| git add . | |
| git commit -m "Initial commit" | |
| -- push to the github remote repos ensuring you overwrite history | |
| git remote add origin [email protected]:<YOUR ACCOUNT>/<YOUR REPOS>.git |