Skip to content

Instantly share code, notes, and snippets.

View KingYes's full-sized avatar

Yakir Sitbon KingYes

View GitHub Profile
@KingYes
KingYes / omer-count.php
Created April 9, 2013 12:12
Very PHP Simple method for counting of the Omer.
<?php
/**
* Very Simple method for Omer count.
*
* @return bool|int Omer count or false if out Omer range date.
*
* @author Yakir Sitbon (http://www.yakirs.net/)
*/
function yakir_get_omer_count() {
// Get now jd date.
@KingYes
KingYes / lame-vbr-id3tags.py
Created November 26, 2013 14:41
Encode audio files (VBR Profile) and preserve id3 tags used with `lame` program.
#!/bin/python
# -*- coding: utf-8 -*-
"""
Encode audio files (VBR Profile) and preserve id3 tags
used with `lame` program.
@Author: Yakir Sitbon <http://www.yakirs.net/>
@Version: 1.0
"""
import os
@KingYes
KingYes / waze.svg
Created September 9, 2014 17:16
Waze Icon SVG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@KingYes
KingYes / run-wp-cron.sh
Last active December 31, 2019 07:09 — forked from bjornjohansen/run-wp-cron.sh
Run all due cron events for WordPress with WP-CLI. Works with both single sites and multisite networks.
#!/bin/bash
# Copyright © 2015 Bjørn Johansen
# This work is free. You can redistribute it and/or modify it under the
# terms of the Do What The Fuck You Want To Public License, Version 2,
# as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.
WP_PATH="/your/wp/path/"
WP_CLI="/usr/local/bin/php /usr/local/bin/wp"
# Check if WP-CLI is available
@KingYes
KingYes / idle.py
Created October 7, 2014 04:55
Sample code in Python to detect idle time
import sys
if sys.platform == 'win32':
from ctypes import *
class LASTINPUTINFO(Structure):
_fields_ = [
('cbSize', c_uint),
('dwTime', c_int),
]