| Filter | Description | Example |
|---|---|---|
| allintext | Searches for occurrences of all the keywords given. | allintext:"keyword" |
| intext | Searches for the occurrences of keywords all at once or one at a time. | intext:"keyword" |
| inurl | Searches for a URL matching one of the keywords. | inurl:"keyword" |
| allinurl | Searches for a URL matching all the keywords in the query. | allinurl:"keyword" |
| intitle | Searches for occurrences of keywords in title all or one. | intitle:"keyword" |
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
| package main | |
| import ( | |
| "fmt" | |
| "syscall" | |
| "unicode/utf16" | |
| "unsafe" | |
| ) | |
| //https://github.com/golang/go/wiki/WindowsDLLs |
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
| class MyEventEmitter { | |
| constructor() { | |
| this._events = {}; | |
| } | |
| on(name, listener) { | |
| if (!this._events[name]) { | |
| this._events[name] = []; | |
| } |
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
| #!/usr/bin/env python3 | |
| ''' | |
| Determine if this python is part of an executable or a standalone script and then delete the file accordingly. | |
| If the script has been bundled into an executable using pyinstaller (such as pyinstaller --onefile <fname>.py) then the realpath of __file__ will be incorrect, thus the use of sys.executable. | |
| Example of just relying on __file__: | |
| $ pyinstaller --onefile test.py | |
| [...] | |
| $ ls dist/ |
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
| # Please note, the commands below will create unreadable files and should be | |
| # used for testing file size only. If you're looking for something that has | |
| # lines in it, use /dev/urandom instead of /dev/zero. You'll then be able to | |
| # read the number of lines in that file using `wc -l large-file.1mb.txt` | |
| # Create a 1MB file | |
| dd if=/dev/zero of=large-file-1mb.txt count=1024 bs=1024 | |
| # Create a 10MB file | |
| dd if=/dev/zero of=large-file-10mb.txt count=1024 bs=10240 |
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
| #!/usr/bin/env bash | |
| #=========================================================================== | |
| # Works only with the official image available in the Mac App Store. | |
| # Make sure you download the official installer before running this script. | |
| #=========================================================================== | |
| hdiutil create -o /tmp/Catalina.cdr -size 9000m -layout SPUD -fs HFS+J | |
| hdiutil attach /tmp/Catalina.cdr.dmg -noverify -mountpoint /Volumes/install_build | |
| sudo /Applications/Install\ macOS\ Catalina.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build --nointeraction | |
| hdiutil detach "/Volumes/Install macOS Catalina" |
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
| package main | |
| import ( | |
| "fmt" | |
| "syscall" | |
| "unsafe" | |
| ) | |
| // error is nil on success | |
| func reboot() error { |
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
| @echo off | |
| rem Version 1.1.1 | |
| set picturePath="%UserProfile%\Pictures\GTA Snapmatic" | |
| set convertScript="%UserProfile%\Pictures\GTA Snapmatic\ConvertSnapmaticToJpg.ps1" | |
| md %picturePath% | |
| echo Copying Snapmatic Pictures to Pictures Folder | |
| echo --------------------------------------------- |
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
| // +build windows | |
| //go:generate go build -ldflags "-s -w -extldflags '-static'" $GOFILE | |
| package main | |
| import ( | |
| "fmt" | |
| "syscall" | |
| "unsafe" | |
| ) |
Names of packages that are to be made widely available should be formed as described in §7.7. Such names are always qualified names whose first identifier consists of two or three lowercase letters that name an Internet domain, such as com, edu, gov, mil, net, org, or a two-letter ISO country code such as uk or jp. Here are examples of hypothetical unique names that might be formed under this convention:
com.JavaSoft.jag.Oak
org.npr.pledge.driver
uk.ac.city.rugby.game