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 <stdio.h> | |
int main(void) { | |
int m = 11, n = 22; | |
int *p = &m, *q = &n; //11, 22 | |
printf("%d %d\n", *p, *q); | |
int **pp = &p, **qq = &q; //11, 22 | |
printf("%d %d\n", **pp, **qq); // | |
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
brew update | |
brew upgrade | |
brew tap homebrew/dupes | |
brew tap homebrew/versions | |
brew tap homebrew/homebrew-php | |
brew install php71 | |
## To use PHP7.1 on CLI, add this to .bash_profile |
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
{ | |
"extends": [ | |
"react-app", | |
"plugin:jsx-a11y/recommended", | |
"plugin:prettier/recommended" | |
], | |
"plugins": ["jsx-a11y", "prettier"], | |
"rules": { | |
"prettier/prettier": [ | |
"error", |
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
FROM wordpress:4.9-php7.2-fpm-alpine | |
# Install the extra packages. | |
RUN apk --no-cache add nginx supervisor curl | |
# Copy all files. | |
COPY ./php.ini $PHP_INI_DIR/conf.d/wp_php.ini | |
COPY ./nginx.conf /etc/nginx/nginx.conf | |
COPY ./supervisord.conf /etc/supervisor/conf.d/supervisord.conf | |
# Disable default entrypoint. | |
ENTRYPOINT [] | |
# Expose Nginx on 80. |
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
<?php | |
/** | |
* Uses the data from unicode.org's emoji-data.txt to build a PHP compatible Regular Expression | |
* along the lines of: | |
* (?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\x{FE0F}?) | |
* | |
* To use: php build-hashtag-regexp.php <emoji-data.txt> | |
* Output will be the generated regular expression. | |
* |
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
<?php | |
// You can find the test data file at https://www.ravis.org/hashtag-test.zip | |
// You're gonna want to have your console output supporting UTF8 before running this, or you're | |
// gonna see a bunch of ? in the output... | |
// For curiosity's sake, post number 693,847 is an emoji hashtag: #(heart) | |
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 | |
# 1 | |
wget -qO root.zone http://www.internic.net/domain/root.zone | |
# 2 | |
cat root.zone | grep "IN\sNS" | awk '{print $1}' | uniq | sort | sed -r 's/\.//g' | sed '/^$/d' > zone.list 2> /dev/null | |
# 3 |
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
{ | |
"env": { | |
"browser": true, | |
"commonjs": true, | |
"es6": true | |
}, | |
"extends": [ | |
"eslint:recommended", | |
"airbnb-base", | |
"plugin:vue/recommended", |
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
{ | |
"parser": "@typescript-eslint/parser", | |
"extends": [ | |
"plugin:@typescript-eslint/recommended", | |
"universe/native", | |
"plugin:prettier/recommended" | |
], | |
"plugins": ["@typescript-eslint"], | |
"settings": { | |
"import/resolver": { |
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 _ = require('lodash'); | |
// https://tailwindcss.com/docs/colors/#default-color-palette | |
let colors = { | |
'transparent': 'transparent', | |
'black': '#22292f', | |
'grey-darkest': '#3d4852', | |
'grey-darker': '#606f7b', | |
'grey-dark': '#8795a1', |
OlderNewer