This file contains hidden or 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
| #!/bin/bash | |
| sudo su - | |
| echo 'Changed to root user' >> /tmp/init_sh.log | |
| dd if=/dev/zero of=/swapfile bs=1M count=1024 | |
| mkswap /swapfile | |
| swapon /swapfile | |
| echo '/swapfile swap swap defaults 0 0' >> /etc/fstab | |
| echo 'Created swap memory' >> /tmp/init_sh.log |
This file contains hidden or 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
| static Image load(byte[] data) throws Exception{ | |
| Image image = null; | |
| SeekableStream stream = new ByteArraySeekableStream(data); | |
| String[] names = ImageCodec.getDecoderNames(stream); | |
| ImageDecoder dec = | |
| ImageCodec.createImageDecoder(names[0], stream, null); | |
| RenderedImage im = dec.decodeAsRenderedImage(); | |
| image = PlanarImage.wrapRenderedImage(im).getAsBufferedImage(); | |
| return image; | |
| } |
This file contains hidden or 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
| select * from (select * from myTable mt order by timestamp desc limit 0, 100) as tbl order by timestamp asc; |
This file contains hidden or 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
| <% | |
| response.setHeader("Pragma", "No-chache"); | |
| response.setHeader("Expires", "0"); | |
| response.setHeader("Cache-Control", "no-cache"); | |
| response.setHeader("Content-Type","text/html;charset=UTF-8"); | |
| response.setHeader("P3P","CP=\"NOI ADM DEV PSAi COM NAV OUR OTR STP IND DEM\""); | |
| response.setContentType("text/html; charset=UTF-8"); | |
| request.setCharacterEncoding("UTF8"); | |
| %> |
This file contains hidden or 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
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head> | |
| <style type="text/css"> | |
| #contentLoading { | |
| display: none; | |
| position: fixed; | |
| top: 0; | |
| width: 100%; | |
| z-index: 1000; |
This file contains hidden or 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
| mysqldump -hserver1.domain.com -u user1 -p123456 databasename | mysql --host server2.domain.com --database databasename --user user2 --password=123456 |
This file contains hidden or 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
| $(function () { | |
| var img = new Image(); | |
| // wrap our new image in jQuery, then: | |
| $(img) | |
| // once the image has loaded, execute this code | |
| .load(function () { | |
| // set the image hidden by default | |
| $(this).hide(); | |
| $('#loader1').hide(); |