Skip to content

Instantly share code, notes, and snippets.

View Rican7's full-sized avatar
😮
My dotfiles just keep getting better... and its been OVER 10 YEARS NOW! ⌚😮🤯

Trevor N. Suarez Rican7

😮
My dotfiles just keep getting better... and its been OVER 10 YEARS NOW! ⌚😮🤯
View GitHub Profile
@Rican7
Rican7 / update-copyright-changed-files.sh
Last active May 11, 2016 20:37 — forked from jstruzik/copyright_doc_update_git_diff.sh
Update copyright date only for modified files
@jstruzik
jstruzik / copyright_doc_update_git_diff.sh
Last active May 9, 2016 20:25
Update PHPDoc copyright date only for modified files between branches
@arfon
arfon / big_query_examples.md
Last active September 19, 2022 13:00
BigQuery Examples for blog post

How many times shouldn't it happen...

-- 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
@Rican7
Rican7 / parse_ews_wsdl_supported_operation_input_headers.php
Created March 24, 2016 23:29
Parsing an EWS (Exchange Web Services) WSDL to determine the supported input headers per service operation in PHP
<?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/';
@Rican7
Rican7 / parse_windowszones.php
Last active November 22, 2018 09:42
Parsing Unicode CLDR Windows Timezones in PHP
<?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';
@Ocramius
Ocramius / .gitignore
Last active July 22, 2017 15:20
PissOff: a valid, polite and useful alternative to the `void` return type in PHP
vendor
composer.lock
@josteink
josteink / on_stateful_code.txt
Last active October 21, 2020 05:37
On why stateful code is bad
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?
@Rican7
Rican7 / configure-vim
Last active September 15, 2016 22:03
My VIM compilation configure line
#!/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]
@Rican7
Rican7 / list-interface-types-for-go-project.sh
Last active March 1, 2016 19:23
List interface types for a Go project using Sift (https://sift-tool.org/)
#!/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
@JakeWharton
JakeWharton / GenericCovariants.java
Created January 7, 2016 06:32
Unlike synthetic accessor methods, these synthetic covariant methods are hard or impossible to kill. Generics anyone?
interface Thing<T> {
T thing();
}
class CharSequenceThing implements Thing<CharSequence> {
@Override public CharSequence thing() {
return "CharSequence!";
}
}