View github-regexp.csv
We can't make this file beautiful and searchable because it's too large.
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
pattern,cnt | |
^,1657 | |
-$,376 | |
--,355 | |
root.*/file.*\n,348 | |
(?m)^hello world,338 | |
\s+,296 | |
\s*,278 | |
^[a-z],275 | |
[cg]pu,245 |
View nginx.conf
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
server { | |
listen 8080; | |
server_name _; | |
gzip on; | |
location / { | |
proxy_pass http://127.0.0.1:8888; | |
} | |
} |
View function.js
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
const {Firestore} = require('@google-cloud/firestore'); | |
const firestore = new Firestore(); | |
exports.helloWorld = async (req, res) => { | |
const document = firestore.doc('users/steren'); | |
const doc = await document.get(); | |
console.log('Read the document'); | |
res.status(200).send('Hey'); | |
}; |
View enable-fb-hosting-cloud-run.sh
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
#!/bin/bash | |
# Set up Firebase Hosting in front of a Cloud Run service, without using the firebase CLI | |
# The following commands must be installed: | |
# - gcloud | |
# - curl | |
# - jq | |
# Update these variables | |
PROJECT_ID="enable-fb-hosting" # Make sure you have enabled Firebase on this Google Cloud project |
View gist:1538982
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 fetch upstream && git diff remotes/upstream/master master > changes.diff |
View curl.sh
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
$ curl -H "Metadata-Flavor:Google" http://metadata.google.internal/computeMetadata/v1/project/project-id |
View Application.java
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
public class Application extends Controller { | |
public static void index() { | |
render(); | |
} | |
public static void uploadPicture(Picture picture) { | |
picture.save(); | |
index(); | |
} |
View regexp-github.sql
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
# Extracts constant Go regular expressions from GitHub | |
# using BigQuery GitHub public dataset. | |
# To run on the entire GitHub corpus, | |
# remove the `sample_` prefix from the table names. | |
# Warning: This query processes ~2.2 TB of data, which is above BigQuery free quota. | |
SELECT | |
REGEXP_EXTRACT(pattern, r'^[\"\`](.*)[\"\`]$') as pattern, | |
COUNT(*) AS cnt, | |
FROM ( | |
SELECT |
View chunked.go
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 main | |
import ( | |
//"bytes" | |
//"io/ioutil" | |
"fmt" | |
"io" | |
"log" | |
"net/http" | |
"os" |
View balsamiq.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder