Skip to content

Instantly share code, notes, and snippets.

Ꙩ_Ꙩ
⨀_⨀
ꙩ_ꙩ
⨀_Ꙩ
Ꙫ_Ꙫ
ꙫ_ꙫ
ꙮ_ꙮ
⨂_⨂
Ꙩ⌵Ꙩ
(/◔ ◡ ◔)/
@lightyoruichi
lightyoruichi / iphone
Created August 25, 2011 13:22
iphone
1.) Open any application
2.) Press and hold the power button until the slide to shutdown swipe bar appears.
3.) Release Power button
4.) Press and hold Home button Lightly
until screen returns to icon screen
5.) Enjoy your functioning home button!!!
@lightyoruichi
lightyoruichi / index.html
Created November 28, 2011 11:10
meta redirect
<html>
<head>
<title></title>
<meta http-equiv="refresh" content="0; url=http://nasihsaifullah.com">
</head>
<body>
</body>
</html>
@lightyoruichi
lightyoruichi / index.html
Created November 29, 2011 03:40
facebook app width fluid
// Load body and before content divs
<body style="margin:0; padding:0; border:0">
<div id="allContent" style="height:100%">
<div id="output" />
</div>
<div id="fb-root"></div>
// Add this before closing body
<script src="http://connect.facebook.net/en_US/all.js"></script>
<?php
$wpdb->hide_errors(); nocache_headers();
global $userdata; get_currentuserinfo();
if(!empty($_POST['action'])){
require_once(ABSPATH . 'wp-admin/includes/user.php');
require_once(ABSPATH . WPINC . '/registration.php');
check_admin_referer('update-profile_' . $user_ID);
/*Register*/
/* tabbed list */
ul.tabs_login {
padding: 0; margin: 20px 0 0 0;
position: relative;
list-style: none;
font-size: 14px;
z-index: 1000;
float: left;
@lightyoruichi
lightyoruichi / functions.php
Created February 9, 2012 10:22
See which file WP is loading for templates
// this can live in /themes/mytheme/functions.php, or maybe as a dev plugin?
function get_template_name () {
foreach ( debug_backtrace() as $called_file ) {
foreach ( $called_file as $index ) {
if ( !is_array($index[0]) AND strstr($index[0],'/themes/') AND !strstr($index[0],'footer.php') ) {
$template_file = $index[0] ;
}
}
}
$template_contents = file_get_contents($template_file) ;
@lightyoruichi
lightyoruichi / search.php
Created March 1, 2012 16:52
Show all tables in a comma separated form
<?php
$con = mysql_connect("127.0.0.1","yourmom","pass"); // host, user, pass
mysql_select_db("fbfriend"); // db name
// Get the search variable from URL
$searchstring = "test" ; // or $_POST['term'] if you're using a search form
//get all the tables from the database test
$q = "show tables";
$r = mysql_query($q);
@lightyoruichi
lightyoruichi / facebookapi.php
Created April 19, 2012 09:23
Facebook API stuff
Notes on the facebook api.
1) FB INIT
<div id="fb-root"></div> <!--- MUST be there !-->
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({
appId:'YOUR_APP_ID', cookie:true,
status:true, xfbml:true
});
</script>
@lightyoruichi
lightyoruichi / index.html
Created July 5, 2012 13:57 — forked from pierresauvignon/index.html
Finds the places around you. This is just a proof of concept. Use at your own risks...
<!DOCTYPE html>
<head>
<title>Checkin</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="description" content="Shows you the places around you">
<meta name="author" content="Pierre Sauvignon for Pollenizer">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>