Skip to content

Instantly share code, notes, and snippets.

View halityurttas's full-sized avatar

Halit YURTTAŞ halityurttas

View GitHub Profile
@lopspower
lopspower / README.md
Last active May 13, 2025 01:14
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@tarikcayir
tarikcayir / get_daft_posts.php
Created August 30, 2015 09:02
WP_Query get draft posts!
<?php
// Query args.
$args = array(
'post_type' => array( 'post', 'page' ),
'post_status' => 'draft'
);
$query = new WP_Query( $args );
@marcinwol
marcinwol / compile_monero.sh
Created August 16, 2015 01:19
Ubuntu 14:04: compile CPUMiner/minerd (forked by LucasJones & Wolf) for Monero mining
# get git to install it
sudo apt-get install git
# dependencies
sudo apt-get install build-essential autotools-dev autoconf libcurl3 libcurl4-gnutls-dev
# download latest version
git clone https://github.com/wolf9466/cpuminer-multi
cd cpuminer-multi/
@MatthewBarker
MatthewBarker / DataService.cs
Created February 18, 2015 15:54
Server side sorting, paging & filtering from DataTable to Kendo UI Grid
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using Newtonsoft.Json;
/// <summary>
/// Represents the data service.
/// </summary>
public class DataService
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@magnetikonline
magnetikonline / dumprequest.php
Last active March 21, 2025 08:29
PHP script to dump full HTTP request to file (method, HTTP headers and body).
<?php
// https://gist.github.com/magnetikonline/650e30e485c0f91f2f40
class DumpHTTPRequestToFile {
public function execute($targetFile) {
$data = sprintf(
"%s %s %s\n\nHTTP headers:\n",
$_SERVER['REQUEST_METHOD'],
$_SERVER['REQUEST_URI'],
$_SERVER['SERVER_PROTOCOL']
@bennadel
bennadel / code-1.cfm
Created March 25, 2014 00:26
Stripping XML Name Spaces And Node Prefixes From ColdFusion XML Data (To Simplify XPath)
<!--- Store the XStandard SOAP XML. --->
<cfsavecontent variable="strXml">
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
@davidpaulsson
davidpaulsson / wp-get_id_by_slug
Created February 26, 2014 06:20
WordPress: Get page ID from slug
// Usage:
// get_id_by_slug('any-page-slug');
function get_id_by_slug($page_slug) {
$page = get_page_by_path($page_slug);
if ($page) {
return $page->ID;
} else {
return null;
}
/*
html2image 0.0.1 <http://html2canvas.hertzen.com>
Copyright (c) 2013 Ryota Mochizuki (@polidog)
Fork by
html2canvas 0.4.0 <http://html2canvas.hertzen.com>
Copyright (c) 2013 Niklas von Hertzen (@niklasvh)
Released under MIT License
*/
@jalalhejazi
jalalhejazi / IIS_Verbs.config
Created May 26, 2013 16:58
CORS: Web.config to enable CORS
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*"/>
<add name="Access-Control-Allow-Methods" value="GET,PUT,POST,DELETE,OPTIONS"/>
<add name="Access-Control-Allow-Headers" value="Content-Type"/>
</customHeaders>
</httpProtocol>