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 | |
/** | |
* @author Henrik Hofmeister | |
* @license MIT | |
* @version 1.0 | |
* | |
* XmlRPC using SimpleXML and CURL | |
* | |
* Usage: | |
* |
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
# source: http://st-on-it.blogspot.com/2010/01/how-to-move-folders-between-git.html | |
# First of all you need to have a clean clone of the source repository so we didn't screw the things up. | |
git clone git://server.com/my-repo1.git | |
# After that you need to do some preparations on the source repository, nuking all the entries except the folder you need to move. Use the following command | |
git filter-branch --subdirectory-filter your_dir -- -- all | |
# This will nuke all the other entries and their history, creating a clean git repository that contains only data and history from the directory you need. If you need to move several folders, you have to collect them in a single directory using the git mv command. |
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
-server | |
-Xms2048m | |
-Xmx2048m | |
-XX:NewSize=512m | |
-XX:MaxNewSize=512m | |
-XX:PermSize=512m | |
-XX:MaxPermSize=512m | |
-XX:+UseParNewGC | |
-XX:ParallelGCThreads=4 | |
-XX:MaxTenuringThreshold=1 |
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 | |
/** | |
* Thanks for James Kemp / Iconic turning the idea into a plugin | |
* https://wordpress.org/plugins/shortcode-pagination-for-woocommerce | |
* | |
* This code shows pagination for WooCommerce shortcodes when it's embeded on single pages. | |
* Include into functions.php. | |
*/ | |
if ( ! is_admin() ) { |
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 | |
# This gist contains pre-commit hooks to prevent you from commiting bad code or to the wrong branch. | |
# There are six variants that I have built: | |
# - pre-commit: stops commits to master/main/develop branches. | |
# - pre-commit-2: also includes a core.whitespace check. | |
# - pre-commit-3: the core.whitespace check and an EOF-newline-check. | |
# - pre-commit-4: only the core.whitespace check. | |
# - pre-commit-5: elixir formatting check. | |
# - pre-commit-6: prettier formatting check. | |
# Set the desired version like this before proceeding: |
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
# Copyright 2017 Dan Krause | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
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
# vim: set filetype=bash : | |
# Install: `ln -s ~/.bash/dircolors ~/.dircolors` | |
# Configuration file for the color ls utility | |
# This file goes in the /etc directory, and must be world readable. | |
# You can copy this file to .dir_colors in your $HOME directory to override | |
# the system defaults. | |
# COLOR needs one of these arguments: 'tty' colorizes output to ttys, but not | |
# pipes. 'all' adds color characters to all output. 'none' shuts colorization | |
# off. |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html> | |
<head> | |
<title>Overriding jQuery Methods</title> | |
<script type="text/javascript" src="jquery-1.3.2.js"></script> | |
<script type="text/javascript"> | |
// Create a closure so that we can define intermediary | |
// method pointers that don't collide with other items | |
// in the global name space. |
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
import sys | |
from gi.repository import Gtk, Gdk, WebKit | |
class WebKitWindow(Gtk.Window): | |
scrolls = None | |
webView = None | |
def __init__(self, url, transparent=False): | |
Gtk.Window.__init__(self, Gtk.WindowType.TOPLEVEL, title='') | |
self.scrolls = Gtk.ScrolledWindow() |
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
import json | |
import os | |
import requests | |
GITHUB_TOKEN = os.environ.get('GITHUB_TOKEN') | |
if GITHUB_TOKEN is None: | |
raise Exception('Missing GITHUB_TOKEN from os.environ') |
OlderNewer