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 | |
// BACKUP / DUMP | |
// mysqldump -u<username> --password='<password>' <database> <table1,table2,..> > <filename>.<sql/extension> | |
// RESTORE | |
// mysqldump -u<username> --password='<password>'; <enter> | |
// use <databasename>; | |
// source <filename>.<sql/extension> |
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 | |
function _autonumber($field, $table, $Parse, $Digit_Count) { | |
$NOL = "0"; | |
$query = "Select " . $field . " from " . $table . " where " . $field . " like '" . $Parse . "%' order by " . $field . " DESC LIMIT 0,1"; | |
// CODEIGNITER | |
$identifier = &get_instance(); | |
$data = $identifier->db->query($query)->result_array(); | |
// YII Way |
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
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> | |
<?php | |
if (isset($_POST["tombol"])) { | |
$head = $_POST["head"]; | |
$detail = $_POST["item"]; | |
echo "Head Looping Foreach <br/>"; | |
foreach ($head as $k => $v) { | |
echo $k . " = " . $v . "<br/>"; | |
} |
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
<IfModule mod_mime.c> | |
# Text | |
AddType text/css .css | |
AddType application/x-javascript .js | |
AddType text/html .html .htm | |
AddType text/richtext .rtf .rtx | |
AddType text/plain .txt | |
AddType text/xml .xml |
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
// 1. Use object.some | |
var index = -1; | |
items.some(function(el, i) { | |
if (el.OBJECT_NAME == "search") { | |
index = i; | |
return true; | |
} | |
}); | |
// 2. use underscore.js |
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
AddOutputFilterByType DEFLATE text/plain | |
AddOutputFilterByType DEFLATE text/html | |
AddOutputFilterByType DEFLATE text/xml | |
AddOutputFilterByType DEFLATE text/css | |
AddOutputFilterByType DEFLATE application/xml | |
AddOutputFilterByType DEFLATE application/xhtml+xml | |
AddOutputFilterByType DEFLATE application/rss+xml | |
AddOutputFilterByType DEFLATE application/javascript | |
AddOutputFilterByType DEFLATE application/x-javascript |
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
using Misc.Helpers.IPNumbers; | |
using System; | |
using System.Collections.Generic; | |
using System.Configuration; | |
using System.Web; | |
using System.Web.Http; | |
using System.Web.Http.Controllers; | |
namespace Misc.WebApi.Filters | |
{ |
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
using System; | |
using System.Configuration; | |
using System.Web; | |
using System.Web.Http; | |
using System.Web.Http.Controllers; | |
namespace Miscellaneous.Attributes.Controller | |
{ | |
/// <summary> | |
/// Filter by IP address (ASP.NET Web API version) |
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 by Bo Norgaard, All rights reserved. | |
using System; | |
using System.Text; | |
using System.Collections; | |
namespace Misc.Helpers.IPNumbers | |
{ | |
/// <summary> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<directoryBrowse enabled="false" /> | |
<rewrite> | |
<rules> | |
<rule name="wordpress" patternSyntax="Wildcard"> | |
<match url="*" /> | |
<conditions> | |
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> |
OlderNewer