Skip to content

Instantly share code, notes, and snippets.

🌊
Surfing the internet

Dominik Schilling ocean90

View GitHub Profile
View _assh
#compdef assh
###############################################################################
# -*- mode:sh; -*-
# Time-stamp: <Thu 2017-03-16 15:37 svarrette>
#
# Zsh completion for [assh](https://github.com/moul/advanced-ssh-config)
#
# Copyright (c) 2017 Sebastien Varrette <Sebastien.Varrette@uni.lu>
###############################################################################
# Enable this completion file by adding somewhere in your zsh configuration (most
View gist:73b537e34353a8874bc9658f480d62d4
Extension: ico
wordpress => image/x-icon
apache => image/vnd.microsoft.icon
Extension: asf
wordpress => video/x-ms-asf
apache => application/vnd.ms-asf
Extension: avi
wordpress => video/avi
apache => video/x-msvideo
Extension: divx
View gist:5d0d0d52a6f3d31be4f821d8f0a6cf4d
Extension: avi
wordpress => video/avi
apache => video/x-msvideo
Extension: divx
wordpress => video/divx
apache =>
Extension: m4v
wordpress => video/mp4
@ocean90
ocean90 / _assh
Last active Nov 9, 2016
zsh completion for assh
View _assh
#compdef assh
# assh autocompletion for oh-my-zsh
# Requires: assh installed
# Author: Dominik Schilling (@ocean90)
# Install:
# Copy the file to ~/.oh-my-zsh/plugins/assh/_assh and add assh to the plugins list in your ~/.zshrc file.
# Resources:
View 21760.php
<?php
# for((i=100;i--;)); do php 21760.php; done
include __DIR__ . '/wp-load.php';
global $wpdb;
$memory = memory_get_usage();
$num_queries = $wpdb->num_queries;
$start = microtime( true );
get_term_by( 'slug', 'tag-117', 'post_tag' );
@ocean90
ocean90 / tree.txt
Created Apr 1, 2016
Tree of node_modules
View tree.txt
.
├── JSONStream
│   ├── examples
│   └── test
│   ├── disabled
│   └── fixtures
├── abbrev
├── acorn
│   ├── bin
│   ├── dist
View theme-update.json
{
"themes": {
"generatepress": {
"theme": "generatepress",
"new_version": "1.3.28",
"url": "https://wordpress.org/themes/generatepress/",
"package": "https://downloads.wordpress.org/theme/generatepress.1.3.28.zip",
"translations": [
{
"type": "theme",
View theme.js
var oldThemesView = wp.themes.view.Themes;
wp.themes.view.Themes = oldThemesView.extend({
initialize: function() {
oldThemesView.prototype.initialize.apply( this, arguments );
this.stopListening( this.parent, 'theme:scroll' );
},
});
View console.log
VM794:1 Uncaught SyntaxError: Unexpected token <
(anonymous function) @ jquery.js?ver=1.12.0:2
n.extend.globalEval @ jquery.js?ver=1.12.0:2
Ha @ jquery.js?ver=1.12.0:3
n.fn.extend.replaceWith @ jquery.js?ver=1.12.0:3
wp.customize.selectiveRefresh.self.Partial.api.Class.extend.renderContent @ customize-selective-refresh.js?ver=4.5-alpha-35776-src-1455797107:295
wp.customize.navMenusPreview.wp.customize.MenusCustomizerPreview.self.NavMenuInstancePartial.api.selectiveRefresh.Partial.extend.renderContent @ customize-preview-nav-menus.js?ver=4.5-alpha-35776-src-1455797107:118
(anonymous function) @ customize-selective-refresh.js?ver=4.5-alpha-35776-src-1455797107:225
_.each._.forEach @ underscore.js?ver=1.8.3:153
View country2langs.php
<?php
$data = file_get_contents( 'https://raw.githubusercontent.com/unicode-cldr/cldr-core/master/supplemental/territoryInfo.json' );
$data = json_decode( $data );
$country2langs = [];
foreach ( $data->supplemental->territoryInfo as $country => $data ) {
if ( ! isset( $data->languagePopulation ) ) {
continue;
You can’t perform that action at this time.