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
| # https://www.atpeaz.com/disable-zscaler-temporarily-on-your-mac/ | |
| # disable | |
| sudo launchctl unload /Library/LaunchDaemons/com.zscaler.service.plist && sudo launchctl unload /Library/LaunchDaemons/com.zscaler.tunnel.plist | |
| # Reenable | |
| sudo launchctl load /Library/LaunchDaemons/com.zscaler.service.plist && sudo launchctl load /Library/LaunchDaemons/com.zscaler.tunnel.plist |
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
| // SPDX-License-Identifier: MIT | |
| // | |
| // This code will add a GPT3() function in your Google Sheets | |
| // This code is originally inspired from https://twitter.com/fabianstelzer/status/1572926883179778050 | |
| // To use it, insert your API key below, open Google Sheets -> Extensions -> Apps Script -> Copy & Paste this -> Save | |
| // | |
| // Usage: =GPT3(prompt, max_tokens (default=15), model (default=davinci)) | |
| // Example usage: =GPT3("Once upon a time,", 1000, "davinci") | |
| var API_KEY = "your-API-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
| javascript: (function (doc){var changed=0; function checkTitles(){console.log('jQuery version ', $.fn.jquery, ' loaded'); var position=1; var items=[]; var results=$('#rso .kp-blk .g, #rso .g[class="g"], #rso .srg .g').not('.kno-kp .g').find('div:first').find('a:first'); $('.title-changed, #CountTitlesChanged').remove(); results.each(function (){if (!$(this).parents('.related-question-pair').length){var parent=$(this).closest('.tF2Cxc').length > 0 ? $(this).closest('.tF2Cxc') : $(this).closest('li'); items.push([ position, $(this).find('h3').text(), encodeURI($(this).attr('href')), parent]); position++;}}); var numItems=1; cors_proxies=[ 'https://api.codetabs.com/v1/proxy?quest=', 'https://jsonp.afeld.me/?url=',]; items.forEach(item=>{$.ajax({url: cors_proxies[Math.floor(Math.random() * cors_proxies.length)] + item[2], success: function (data, status, xhr){title=$(data).filter('title').text(); var html='<div class="title-changed">'; if (title !=item[1]){html +='<span style="font-weight: bold;color: #ff6961;"> |
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
| const puppeteer = require('puppeteer'); | |
| const devices = require('puppeteer/DeviceDescriptors'); | |
| var fs = require('fs'); | |
| const mergeImg = require('merge-img'); | |
| const ampToolboxCacheUrl = require('amp-toolbox-cache-url').createCacheUrl; | |
| const Good3G = { | |
| 'offline': false, | |
| 'downloadThroughput': 1.5 * 1024 * 1024 / 8, | |
| 'uploadThroughput': 750 * 1024 / 8, |
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
| const puppeteer = require('puppeteer'); | |
| const Good3G = { | |
| 'offline': false, | |
| 'downloadThroughput': 1.5 * 1024 * 1024 / 8, | |
| 'uploadThroughput': 750 * 1024 / 8, | |
| 'latency': 40 | |
| }; | |
| const phone = puppeteer.KnownDevices['Nexus 5X']; |
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
| [[source]] | |
| name = "pypi" | |
| url = "https://pypi.org/simple" | |
| verify_ssl = true | |
| [dev-packages] | |
| [packages] | |
| mysql-connector-python = "*" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| console.log('Client-side code running'); | |
| const button = document.getElementById('myButton'); | |
| button.addEventListener('click', function(e) { | |
| console.log('button was clicked'); | |
| fetch('/clicked', {method: 'POST'}) | |
| .then(function(response) { | |
| if(response.ok) { | |
| console.log('click was recorded'); |
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
| # One liner | |
| wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com | |
| # Explained | |
| wget \ | |
| --recursive \ # Download the whole site. | |
| --page-requisites \ # Get all assets/elements (CSS/JS/images). | |
| --adjust-extension \ # Save files with .html on the end. | |
| --span-hosts \ # Include necessary assets from offsite as well. | |
| --convert-links \ # Update links to still work in the static version. |
NewerOlder