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 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
#include <iostream> | |
#include <regex> | |
#include <string> | |
#include <vector> | |
#include <sstream> | |
#include <map> | |
std::vector<std::string> split(const std::string& s, char delimiter) | |
{ | |
std::vector<std::string> tokens; |
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
Section "Device" | |
Identifier "Intel Graphics" | |
Driver "intel" | |
Option "DRI" "2" | |
Option "TearFree" "true" | |
Option "Backlight" "Intel_backlight" | |
EndSection |
Since kernel version 4.4.0-20, it was enforced that unsigned kernel modules will not be allowed to run with Secure Boot enabled. Because you want to keep Secure Boot, then the next logical step is to sign those modules.
So let's try it.
openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=Descriptive name/"
- Find files containing "foo", and print the line matches in context:
ag foo
- Find files containing "foo" in a specific directory:
ag foo path/to/directory
- Find files containing "foo", but only list the filenames:
ag -l foo
- Find files containing "FOO" case-insensitively, and print only the match, rather than the whole line:
ag -i -o FOO
- Find "foo" in files with a name matching "bar":
ag foo -G bar
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
#!/usr/bin/python | |
import re | |
import sys | |
def removeComments(text): | |
""" remove c-style comments. | |
text: blob of text with comments (can include newlines) | |
returns: text with comments removed | |
""" | |
pattern = r""" |
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
git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
export PS1="\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\] \[\033[01;31m\]\$(git_branch)\[\033[00m\]\$ " | |
The following command creates a single .patch file that contains multiple commits.
git format-patch cc1dde0dd^..6de6d4b06 --stdout > foo.patch
You can then apply it like so:
git am foo.patch
Note: Be sure to use ^.. instead of .. if you want the first commit SHA to be included.
OlderNewer