Skip to content

Instantly share code, notes, and snippets.

View turtlix's full-sized avatar
:octocat:

Andri Andreas Priyanto turtlix

:octocat:
View GitHub Profile
/*
* Author: http://stuffandnonsense.co.uk/blog/about/hardboiled_css3_media_queries/
*/
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}
/*
* Author: http://stuffandnonsense.co.uk/blog/about/hardboiled_css3_media_queries/
*/
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}
@turtlix
turtlix / Email.php
Created September 13, 2013 03:32 — forked from narfbg/Email.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
* An open source application development framework for PHP 5.2.4 or newer
*
* NOTICE OF LICENSE
*
* Licensed under the Open Software License version 3.0
*
<?php if (!defined('BASEPATH')) { exit('No direct script access allowed'); }
class GoogleSearch {
private $ci;
//you will get these from your Google Custom Search Engine that you have created using their API
private $key = "YOUR_KEY";
private $cx = "YOUR_CX";
public $version = "v1";
public $url = "https://www.googleapis.com/customsearch";
@turtlix
turtlix / ffmpeglib.php
Last active September 7, 2021 17:32
Library for FFMPEG Converter from: http://ellislab.com/forums/viewthread/58362/#537296
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
* An open source application development framework for PHP 4.3.2 or newer
*
* @package CodeIgniter
* @author Rick Ellis
* @copyright Copyright (c) 2006, EllisLab, Inc.
* @license http://www.codeignitor.com/user_guide/license.html
<!DOCTYPE html>
<html>
<head>
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
/*
* anchor-include pattern for already-functional links that work as a client-side include
* Copyright 2011, Scott Jehl, scottjehl.com
* Dual licensed under the MIT
* Idea from Scott Gonzalez
* to use, place attributes on an already-functional anchor pointing to content
* that should either replace, or insert before or after that anchor
* after the page has loaded
* Replace: <a href="..." data-replace="articles/latest/fragment">Latest Articles</a>
* Before: <a href="..." data-before="articles/latest/fragment">Latest Articles</a>
<?php
// Run from the command line, so we'll grab arguments from there
// input arguments: 0=>script, 1=>file_name, 2=>temp_file
$file_name = $argv[1];
$temp_file = $argv[2];
$uploads = '/opt/lampp/htdocs/user_uploads/';
// Set up file location strings
if (top.location != self.location) {
top.location = self.location.href;
}
// With PHP
$text = preg_replace( '|([^\s])\s+([^\s]+)\s*$|', '$1 $2', $text);