2012.03.21 02:35

This plugin was originally written by Dave Methvin.
Dave and I collaborated on several improvements and the project is now hosted on github.
The most recent version is also available here: jquery.corner.js.

Absolute Position
It's important to understand that this corner plugin is pulling off its magic by adding more elements to the page. Specifically, it adds div "strips" to the item to be cornered and sets a solid background color on these strips in order to hide the actual corners of the real item. So if you step back and look at the cornered element, think of there being solid colored divs hiding the true squared off corners of the item you wish to be changed. This helps you understand the inherent limitations of this small plugin. It's best suited for rounding off block-level elements (divs, paragraphs, etc) and may present more challenges when trying to round off inline elements (spans, anchors, etc).
Recently I added support for native border-radius rounding in browsers that support it (Opera 10.5+, Firefox, Safari, and Chrome). So in those browsers the plugin simply sets a css property on the element. But in IE, we'll have to wait for version 9 before that is supported. And for all browsers, choosing a pattern other than "round" requires the use of the "div stips" method.
Auto-Ready!

Available Patterns

The default pattern is round

Round

$(this).corner();

Bevel

$(this).corner("bevel");

Notch

$(this).corner("notch");

Bite

$(this).corner("bite");

Cool

$(this).corner("cool");

Sharp

$(this).corner("sharp");

Slide

$(this).corner("slide");

Jut

$(this).corner("jut");

Curl

$(this).corner("curl");

Tear

$(this).corner("tear");

Fray

$(this).corner("fray");

Wicked

$(this).corner("wicked");

Sculpt

$(this).corner("sculpt");

Long

$(this).corner("long");

Dog Ear

$(this).corner("dog");

Dog2

$(this).corner("dog2");

Dog3

$(this).corner("dog3");

Dogfold*

$(this).corner("dogfold");

Bevelfold*

$(this).corner("bevelfold");

Steep

$(this).corner("steep");

InvSteep

$(this).corner("invsteep");

* Fold lines are not supported in Internet Explorer for pages rendered in quirksmode.
* Fold lines are only supported on top corners in Internet Explorer, unless running in IE8 standards-mode.

Choose Your Corner

Use top, bottom, left, right, tl, tr, bl, br to identify which corner to style

Top Bevel

$(this).corner("bevel top");

Top-Left Bite

$(this).corner("bite tl");

Round Bottom

$(this).corner("bottom");

Left Notch

$(this).corner("notch left");

Top-Right Dog Ear

$(this).corner("dog tr");

Top-Left, Bottom-Right Cool

$(this).corner("cool tl br");

Right Bevelfold

$(this).corner("bevelfold right");

Specify Size

Include a px value to specify the corner size

Round 30px

$(this).corner("30px");

Round 5px

$(this).corner("5px");

Cool 20px

$(this).corner("cool 20px");

Sharp 20px

$(this).corner("sharp 20px");

Bite 30px

$(this).corner("bite 30px");

Wicked 20px

$(this).corner("wicked 20px");

Dog 20px

$(this).corner("dog 20px");

Dog2 30px

$(this).corner("dog2 30px");

Dog3 30px

$(this).corner("dog3 30px");

Mix and Match

Chain corner calls to achieve combined effects

Round and Bevel

$(this).corner( "bottom").corner("top bevel");

Round and Notch

$(this).corner( "br top").corner("notch bl 20px");

Crazy

$(this).corner("jut tl 20px").corner("dog tr 20px").corner("bite bl 15px").corner("notch br");

Adornment

Effects Using Nested Cornered Elements (Thanks to Kevin Scholl for this idea)

Round

$(this).corner("round 8px").parent().css('padding', '4px').corner("round 10px")

Round

$(this).corner("round 8px").parent().css('padding', '8px').corner("round 14px")

Round

$(this).corner("round 14px").parent().css('padding', '15px').corner("round 14px")

Bevel

$(this).corner("bevel 8px").parent().css('padding', '5px').corner("bevel 10px")

Bevel

$(this).corner("bevel 8px").parent().css('padding', '10px').corner("bevel 14px")

Bite

$(this).corner("bite 10px").parent().css('padding', '8px').corner("bite 10px")

Bite

$(this).corner("bite 20px").parent().css('padding', '15px').corner("bite 20px")

Fray

$(this).corner("fray 10px").parent().css('padding', '10px').corner("fray 10px")

Tear

$(this).corner("tear 20px").parent().css('padding', '15px').corner("tear 20px")

Notch

$(this).corner("notch 4px").parent().css('padding', '4px').corner("notch 4px")

Notch

$(this).corner("notch 10px").parent().css('padding', '12px').corner("notch 10px")

Sharp

$(this).corner("sharp 10px").parent().css('padding', '8px').corner("sharp 10px")

Cool

$(this).corner("cool 20px").parent().css('padding', '10px').corner("cool 10px")

Bite/Round

$(this).corner("round 20px").parent().css('padding', '8px').corner("bite 10px")

Round/Bite

$(this).corner("bite 15px").parent().css('padding', '8px').corner("round 10px")

Fray/Tear

$(this).corner("tear 20px").parent().css('padding', '8px').corner("fray 10px")

Jut/Sculpt

$(this).corner("sculpt 20px").parent().css('padding', '8px').corner("jut 10px")

Bevel/Notch

$(this).corner("notch 20px").parent().css('padding', '8px').corner("bevel 15px")

Notch/Bite

$(this).corner("bite 15px").parent().css('padding', '10px').corner("notch 10px")

Bite/Notch

$(this).corner("notch 15px").parent().css('padding', '15px').corner("bite 20px")

Curl/Long

$(this).corner("long 15px").parent().css('padding', '15px').corner("curl 15px")

Pick Your Colors (or keep your borders)

By default, corners are created using transparency and the background color of the parent element. When this is not what you want you can specify the colors that should be used.
        corner color: cc:#xxx
        strip color:  sc:#xxx
        keep borders: keep
        

normal corners

$(this).corner();

colored corners

$(this).corner("cc:#009");

colored strips

$(this).corner("sc:#009");

"keep" border

$(this).corner("keep");

cc:#009 notch

$(this).corner("cc:#009 notch");

cc:#009 keep notch

$(this).corner("keep notch cc:#009");

cc:#009 keep bite

$(this).corner("bite keep 15px cc:#009");

cc:#009 cool keep

$(this).corner("cc:#009 cool keep 20px");

Fun Stuff

Interesting Side Effects

Left

$(this).corner("sharp tr br 20px");

Right

$(this).corner("sharp tl bl 20px");

Fixed or Fluid? No problem!

The following divs have a combination of fixed and fluid widths and heights

Height: Fluid
Width: Fluid
lorem ipsum dolor sit amet consectetuer adipiscing elit sed lorem leo lorem leo consectetuer adipiscing elit

Height: Fixed
Width: Fluid
lorem ipsum dolor sit amet consectetuer adipiscing elit sed lorem leo lorem leo consectetuer adipiscing elit sed lorem leo rhoncus sit amet elementum at bibendum at, eros cras at mi et tortor egestas vestibulum sed cras at mi vestibulum phasellus sed felis sit amet orci dapibus semper.

Height: Fluid
Width: Fixed
lorem ipsum dolor sit amet consectetuer adipiscing elit sed lorem leo lorem leo consectetuer adipiscing elit

Height: Fixed
Width: Fixed
lorem ipsum dolor sit amet consectetuer adipiscing elit sed lorem leo lorem leo consectetuer adipiscing elit

Plain Styling

The following divs test normal fluid content with only the styles shown

Round
This is a plain div with a 30px padding

Round
This is a plain div with a 0px padding

Round
This is a plain div with a 30px padding and 30px margin

Uncornering

The following shows dynamic cornering/uncornering

// script used
...
$('#dynamic').corner();
...
$('#dynamic').uncorner();

Uncornering Demo
This div has an id of #dynamic

Using Markup Metadata Instead of Options

The following shows how to embed the corner options in your markup instead of passing them into the corner function

// markup
<div class="myCorner" data-corner="left 20px">Metadata Example</div>

// script - no options passed to corner function
$('.myCorner').corner();

Metadata Example
Posted by k1rha
2012.03.21 02:33

.ui-mobile-viewport { margin: 0; overflow-x: visible; -webkit-text-size-adjust: none; -ms-text-size-adjust:none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); }

jquerymobile 코드를 삭 뒤져서 겨우 얻어냈다. 

이부분을 없애면된다.  

Posted by k1rha
2012.03.21 00:13

 항상 찾을려면 없는 이코드..

<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>


<script type="text/javascript">
function initialize() {
var myLatlng = new google.maps.LatLng(-34.397, 150.644);
var myOptions = {
zoom: 8,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
}

</script>

<div id="map_canvas" style="width:500px; height:300px;"></div>

이후 body 부분에   onload=" initialize()" 해주면 된다. 

Posted by k1rha
2012.03.21 00:10

execstack -q BINARY

했을때
X 나오면
스택이 executable 한거라네요 ㅎㅎ

일단 확인을 했으니 설정하고 다시 코드로 확인 하는방법!  



2) 최근 lnx kernel 문제

kernel 옵션 중 kernel.randomize_va_space랑 kernel.exec-shield 라는 옵션이 있심...
kernel.randomize_va_space는 random stack기능에 대한거고..
kernel.exec-shield는 executable-stack기능에 대한거고..
0으로 설정하면 Off 1로 설정하면 On
kernel 옵션을 설정하는 파일은 /etc/sysctl.conf이고 이 파일을 다음과 같이 수정한 후 리붓하면 해당 기능들이 꺼짐:

kernel.randomize_va_space = 0
kernel.exec-shield = 0

같은 맥락에서 gcc 옵션도 해 줘야 할 것이 있는데 다음과 같은 옵션이 있음:

-mpreferred-stack-boundary=2
-fno-stack-protector
-z exec-stack

각 옵션이 뭘 뜻하는지는 찾아보삼..

이 설정들을 다 하면 다음과 같은 코드로 테스트 해 볼 수 있삼...

----- rand_stack_test.c
// 다음 코드를 컴파일 한 후 두 번 이상 실행 했을 때 같은 주소가 나온다면
// random-stack 기능이 off 되었다고 할 수 있음
#include <stdio.h>

int main(void)
{
char buf[128];
fprintf(stdout, "buf variable address: 0x%08X\n", buf);
return 0;
}
----- rand_stack_test.c

----- exec_stack_test.c
// 다음 코드를 컴파일 한 후 실행 했을 때 정상적으로 쉘이 실행된다면
// stack-shield 기능이 off 되었다고 할 수 있음
#include <stdio.h>

char sc[] = 
"\x31\xd2\x89\xd0\x52\x68\x2f\x2f\x73\x68"
"\x68\x2f\x62\x69\x6e\x89\xe3\x52\x53\x89"
"\xe1\xb0\x0b\xcd\x80";

int main(void)
{
void (*f)(void);
f = (void*)sc;
f();
return 0;
}
----- exec_stack_test.c

Posted by k1rha
2012.03.21 00:09

SSH 로 서버에 접속시에 세션이 바뀌었을때 처리하는 명령어.
 

ssh-keygen -R [ IP or DomainName]

ex) ssh-keygen -R 123.123.123.123

이렇게 되면 key 값이 조기화 된다.  
Posted by k1rha
2012.03.21 00:08