- https://cloud.google.com/anthos/gke/docs/on-prem/reference/cheatsheet
- https://medium.com/flant-com/kubectl-commands-and-tips-7b33de0c5476
- https://prefetch.net/blog/2019/10/16/the-beginners-guide-to-creating-kubernetes-manifests/
- https://kubernetes.io/docs/user-guide/kubectl-cheatsheet/
- https://learnk8s.io/blog/kubectl-productivity/
- https://medium.com/faun/kubectl-commands-cheatsheet-43ce8f13adfb
This file contains 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
Wow, I got similar problems, and guess what, I zipped repository from my other computer, unpacked and compared with the project I have just cloned, and didn't see the difference, but the error is not present and I am able to code. | |
Btw I tried removing cache, node modules catalog, reinstalling node, changing version, deleting package lock file etc. | |
src\node_modules\nx\src\native\native-bindings.js:244 | |
npm error throw loadError | |
npm error ^ | |
npm error | |
npm error Error: The specified module could not be found. | |
npm error \\?\C:\Users\...\src\.nx\cache\18.3.5-nx.win3npm error \\?\C:\Users\...\src\.nx\cache\18.3.5-nx.win32-x64-msvc.node |
This file contains 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 os | |
from PyPDF2 import PdfReader, PdfWriter | |
def replace_third_page_with_first(dir_path, replacement_file, output_dir): | |
with open(replacement_file, 'rb') as replacement_pdf_file: | |
replacement_pdf = PdfReader(replacement_pdf_file) | |
first_page = replacement_pdf.pages[0] | |
for filename in os.listdir(dir_path): | |
if filename.endswith('.pdf'): |
This file contains 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
/* | |
This code takes a JSON input string and automatically generates | |
SQL Server CREATE TABLE statements to make it easier | |
to convert serialized data into a database schema. | |
It is not perfect, but should provide a decent starting point when starting | |
to work with new JSON files. | |
A blog post with more information can be found at https://bertwagner.com/2018/05/22/converting-json-to-sql-server-create-table-statements/ | |
*/ |
This file contains 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
> foo=$(cat <<EOF | |
{ | |
"Items": | |
[ | |
{ | |
"title": "A Midsummer Night's Dream", | |
"tags":[ | |
"comedy", | |
"shakespeare", | |
"play" |
This file contains 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
package benchmark | |
import ( | |
"github.com/JumboInteractiveLimited/jsonpath" | |
"github.com/loov/hrtime/hrtesting" | |
"github.com/tidwall/gjson" | |
"io/ioutil" | |
"strings" | |
"testing" | |
) |
This file contains 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
If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) | |
{ | |
$arguments = "& '" + $myinvocation.mycommand.definition + "'" | |
Start-Process powershell -Verb runAs -ArgumentList $arguments | |
Break | |
} | |
$remoteport = bash.exe -c "ifconfig eth0 | grep 'inet '" | |
$found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'; |
As configured in my dotfiles.
start new:
tmux
start new with session name:
This file contains 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.Collections.Generic; | |
using System.Linq; | |
namespace ValidatorDekorator | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
This file contains 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.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace PinP.Service | |
{ | |
public delegate bool Validation(); | |
public class ValidatorDtos |
NewerOlder