Skip to content

Instantly share code, notes, and snippets.

View fritexvz's full-sized avatar
🦄
horsin' around

5r!t3x fritexvz

🦄
horsin' around
View GitHub Profile
@chrisguitarguy
chrisguitarguy / pmg-rewrite.php
Created February 11, 2012 00:41
WordPress rewrite tutorial
<?php
/*
Plugin Name: Rewrite Rule Tutorials
*/
add_action( 'init', 'pmg_rewrite_add_rewrites' );
function pmg_rewrite_add_rewrites()
{
add_rewrite_endpoint( 'json', EP_PERMALINK );
add_rewrite_rule(
@jensgro
jensgro / Outliner.js
Created April 23, 2012 12:57 — forked from arieh/Outliner.js
Cross-Lib accessible outline removal
/*!
Copyright (c) <2012> <Arieh Glazer>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
@plentz
plentz / nginx.conf
Last active April 3, 2025 19:20
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@staltz
staltz / introrx.md
Last active April 6, 2025 09:15
The introduction to Reactive Programming you've been missing
@karpathy
karpathy / min-char-rnn.py
Last active April 5, 2025 07:41
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@bishboria
bishboria / springer-free-maths-books.md
Last active March 24, 2025 13:36
Springer made a bunch of books available for free, these were the direct links
@lukecav
lukecav / functions.php
Last active June 8, 2016 18:15
Disable Theme Editors and Plugin Editors from Dashboard
// remove editor for plugins and themes. */
define( 'DISALLOW_FILE_EDIT', true );
// remove wp version meta tag and from rss feed. */
function wprv_remove_version() {
return '';
}
add_filter('the_generator', 'wprv_remove_version');
//Remove error mesage in login. */
@fritexvz
fritexvz / functions.php
Created June 8, 2016 18:15 — forked from lukecav/functions.php
Disable Theme Editors and Plugin Editors from Dashboard
// remove editor for plugins and themes. */
define( 'DISALLOW_FILE_EDIT', true );
// remove wp version meta tag and from rss feed. */
function wprv_remove_version() {
return '';
}
add_filter('the_generator', 'wprv_remove_version');
//Remove error mesage in login. */
@amboutwe
amboutwe / yoast_seo_admin_remove_columns.php
Last active October 17, 2024 22:36
Remove Yoast SEO columns from posts and pages
<?php
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/
/* Remove Yoast SEO columns for all users site wide
* Credit: Andrew Norcross http://andrewnorcross.com/
* Last Tested: Sep 17 2024 using Yoast SEO 23.4 on WordPress 6.6.2
*
* If you have custom post types, you can add additional lines in this format
* add_filter( 'manage_edit-{$post_type}_columns', 'yoast_seo_admin_remove_columns', 10, 1 );
* replacing {$post_type} with the name of the custom post type.
@shagunsodhani
shagunsodhani / PixelRNN.md
Created October 9, 2016 13:22
Summary of PixelRNN paper

Pixel Recurrent Neural Network

Introduction

  • Problem: Building an expressive, tractable and scalable image model which can be used in downstream tasks like image generation, reconstruction, compression etc.
  • Link to the paper

Model

  • Scan the image, one row at a time and one pixel at a time (within each row).