-- https://news.ycombinator.com/item?id=11396045
SELECT count(*)
FROM (SELECT id, repo_name, path
FROM [bigquery-public-data:github_repos.sample_files]
) AS F
😮
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
# Using GNU `sed` | |
git diff --diff-filter=ACMRTUXB --name-only branch_to_compare | xargs sed -i -r "s/copyright(\s+)[0-9]{4}/copyright\1"$(date "+%Y")"/g" |
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
git diff --diff-filter=ACMRTUXB --name-only branch_to_compare | xargs sed -i '' -E 's/@copyright [0-9]{4}/@copyright `date "+%Y"`/g' |
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
<?php | |
// The location of the EWS WSDL here (Office365 here for example) | |
const WSDL_URL = 'https://outlook.office365.com/EWS/Services.wsdl'; | |
const NAMESPACE_WSDL_PREFIX = 'wsdl'; | |
const NAMESPACE_WSDL_URI = 'http://schemas.xmlsoap.org/wsdl/'; | |
const NAMESPACE_SOAP_PREFIX = 'soap'; | |
const NAMESPACE_SOAP_URI = 'http://schemas.xmlsoap.org/wsdl/soap/'; |
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
<?php | |
// The location of the Unicode CLDR "windowsZones" mappings here | |
const XML_URL = 'http://unicode.org/cldr/data/common/supplemental/windowsZones.xml'; | |
const XML_ZONE_MAP_XPATH = '/supplementalData/windowsZones/mapTimezones/mapZone'; | |
const ZONE_TERRITORY_ATTRIBUTE = 'territory'; | |
const ZONE_IANA_NAME_ATTRIBUTE = 'type'; | |
const ZONE_WINDOWS_NAME_ATTRIBUTE = 'other'; |
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
vendor | |
composer.lock |
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
On why stateful code is bad | |
=========================== | |
STUDENT: Sir, can I ask a question? | |
TEACHER: Yes! | |
STUDENT: How do you put an elephant inside a fridge? | |
TEACHER: I don't know. | |
STUDENT: It's easy, you just open the fridge and put it in. I have another question! | |
TEACHER: Ok, ask. | |
STUDENT: How to put a donkey inside the fridge? |
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 | |
./configure --prefix=/usr/local --with-features=huge --enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-cscope [email protected] |
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 sh | |
# NOTE! This requires the "Sift" tool, GNU "sed", and Go (Golang) | |
# | |
# https://sift-tool.org/ | |
# https://github.com/svent/sift | |
# https://www.gnu.org/software/sed/ | |
# https://golang.org/ | |
# https://golang.org/cmd/go/#hdr-Show_documentation_for_package_or_symbol |
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
interface Thing<T> { | |
T thing(); | |
} | |
class CharSequenceThing implements Thing<CharSequence> { | |
@Override public CharSequence thing() { | |
return "CharSequence!"; | |
} | |
} |