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" |
package main | |
import ( | |
"fmt" | |
"syscall" | |
"unicode/utf16" | |
"unsafe" | |
) | |
//https://github.com/golang/go/wiki/WindowsDLLs |
class MyEventEmitter { | |
constructor() { | |
this._events = {}; | |
} | |
on(name, listener) { | |
if (!this._events[name]) { | |
this._events[name] = []; | |
} |
#!/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/ |
#!/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" |
package main | |
import ( | |
"fmt" | |
"syscall" | |
"unsafe" | |
) | |
// error is nil on success | |
func reboot() error { |
@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 --------------------------------------------- |
// +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
A commit should be a wrapper for related changes. For example, fixing two different bugs should produce two separate commits. Small commits make it easier for other developers to understand the changes and roll them back if something went wrong. With tools like the staging area and the ability to stage only parts of a file, Git makes it easy to create very granular commits.
Committing often keeps your commits small and, again, helps you commit only related changes. Moreover, it allows you to share your code more frequently with others. That way it‘s easier for everyone to integrate changes regularly and avoid having merge conflicts. Having large commits and sharing them infrequently, in contrast, makes it hard to solve conflicts.