Skip to content

Instantly share code, notes, and snippets.

View obstschale's full-sized avatar
🥑
Avocado for the wise.

Hans-Helge Buerger obstschale

🥑
Avocado for the wise.
View GitHub Profile
@martinwolf
martinwolf / Preferences.sublime-settings
Last active October 8, 2015 19:18
Sublime Text 2 preferences
{
"bold_folder_labels": true,
"caret_style": "phase",
"color_scheme": "Packages/User/Espresso Soda.tmTheme",
"file_exclude_patterns":
[
".DS_Store",
"._*"
],
"folder_exclude_patterns":
@grancalavera
grancalavera / unicorn.sublime-snippet
Created June 4, 2013 13:26
Unicorn Sublime Text snippet ^.^
<snippet>
<content><![CDATA[
console.log(" /");
console.log(" .7");
console.log(" \\\ , //");
console.log(" |\\\.--._/|//");
console.log(" /\\\ ) ) ).'/");
console.log(" /( \\\ // /");
console.log(" /( J`((_/ \\\");
console.log(" / ) | _\\\ /");
@mkropat
mkropat / ser-pprint.php
Last active June 3, 2016 08:43
Pretty-print PHP serialized files
#!/usr/bin/env php
<?php
$serialized = file_get_contents($argv[1]);
$obj = unserialize($serialized);
$json_obj = json_encode($obj, JSON_PRETTY_PRINT);
echo "$json_obj\n";
@krafit
krafit / wpseo-iconfix.php
Created December 2, 2015 12:38
Nachdem der Schmerz, den wpSEO-Menüpunkt ansehen zu müssen zu groß wurde, habe ich das Icon im Admin-Menü ersetzt.
if (function_exists(wpseo_autoload)) {
function krafit_repair_wpseo() {
?>
<style>
#adminmenu #toplevel_page_wpseo div.wp-menu-image img {
display: none;
}
#adminmenu #toplevel_page_wpseo div.wp-menu-image::before {
content: "\f511";
@allofthenorthwood
allofthenorthwood / bash_profile
Created February 7, 2017 02:45
Fancy prompt for bash
# Crazy prompt things
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="[\D{%D %r} \w]\$(parse_git_branch)"
PS1="\$(lolcat -F 3 -p 25 -f <<< \"$PS1\")"
PS1+="\n\[$(tput setaf 0)\](ノ◕ヮ◕)ノ*:・゚✧ \[$(tput sgr0)\]"
@bonny
bonny / watson-xbar-plugin.sh
Last active January 20, 2022 16:57
xbar script for watson
#!/usr/bin/env bash
# Watson Brew Status
#
# by Antoine Corcy <contact@sbin.dk>
# updated by Pär Thernstrom <par.thernstrom@gmail.com>
# to support Watson custom location and configuration.
#
# <xbar.title>Watson Brew Status</xbar.title>
# <xbar.version>1.0</xbar.version>
@diogojc
diogojc / pagerank.py
Created November 3, 2011 23:11
python implementation of pagerank
import numpy as np
from scipy.sparse import csc_matrix
def pageRank(G, s = .85, maxerr = .001):
"""
Computes the pagerank for each of the n states.
Used in webpage ranking and text summarization using unweighted
or weighted transitions respectively.
@Rarst
Rarst / deprecated.md
Last active February 21, 2023 11:21
WordPress coding standards configuration for PhpStorm

Now Native

PhpStorm now bundles WordPress coding style natively, starting from version 8.

  1. Go to Project Settings > Code Style > PHP.
  2. Select Set From... (top right of window) > Predefined Style > WordPress.

No longer need to muck with this import! :)

@sindresorhus
sindresorhus / codestyle.md
Last active September 26, 2023 07:45
My preferred code style.

Code Style

  • Tab indentation
  • Single-quotes
  • Semicolon
  • Strict mode
  • No trailing whitespace
  • Multiple variable statements
  • Space after keywords and between arguments and operators
  • Return early