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 | |
| DIR="$( cd "$( dirname "$0" )" && pwd )" | |
| pushd "$DIR" > /dev/null | |
| tar -z -p -c -f `date +"%Y%m%d-%H%M%S"`.www.gz -C / -P /etc/httpd/ /srv/www/ | |
| BACKUP_CNT=`ls *.www.gz | wc -l` | |
| if [ "$BACKUP_CNT" -gt "15" ]; then | |
| LAST_BACKUP=`ls *.www.gz | sort | head -n 1` | |
| rm -f $LAST_BACKUP |
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 | |
| DIR="$( cd "$( dirname "$0" )" && pwd )" | |
| pushd "$DIR" > /dev/null | |
| su -l -c "pg_dumpall" postgres | gzip > `date +"%Y%m%d-%H%M%S"`.sql.gz | |
| BACKUP_CNT=`ls *.sql.gz | wc -l` | |
| if [ "$BACKUP_CNT" -gt "15" ]; then | |
| LAST_BACKUP=`ls *.sql.gz | sort | head -n 1` |
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 | |
| if [ -z "$1" ]; then | |
| echo "$0: need an input set file"; | |
| exit 1; | |
| fi | |
| if [ ! -f "$1" ]; then | |
| echo "$0: file not found '$1'"; | |
| exit 1; | |
| fi |
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
| Option Explicit | |
| Public pictureSizeWidth As Integer | |
| Public pictureSizeHeight As Integer | |
| Public Sub insertPicture(file As String, width As Integer) | |
| Dim shp As InlineShape | |
| Set shp = ActiveDocument.InlineShapes.AddPicture( _ | |
| FileName:=file, _ | |
| LinkToFile:=False, _ | |
| SaveWithDocument:=True) |
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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <sys/stat.h> | |
| #include <vector> | |
| #include <iterator> | |
| #include <string> | |
| #include <iostream> | |
| #include <fstream> | |
| #include <sstream> | |
| #include <cctype> |
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
| cd "C:\Program Files (x86)\Arduino" | |
| "hardware\tools\avr\bin\avrdude" | |
| -C"C:\Program Files (x86)\Arduino\hardware\tools\avr\etc\avrdude.conf" | |
| -v -patmega1284p -Pcom5 -b19200 | |
| -c avrisp -Uflash:w:C:\USERS\ADMINI~1\APPDATA\LOCAL\TEMP\build8351945056164552931.tmp/Marlin.cpp.hex:i |
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
| # place setup-x86_64.exe under the cygwin root directory | |
| #apt-cyg | |
| /setup-x86_64.exe -q -P wget,tar,qawk,bzip2,subversion,vim | |
| wget 'http://rawgit.com/transcode-open/apt-cyg/master/apt-cyg' | |
| chmod a+x apt-cyg | |
| mv apt-cyg /bin/ | |
| #/etc/profile |
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
| { | |
| "chart_data": [ | |
| { | |
| "date": "2015-08-10 08:38:51.953332", | |
| "inside": "25.187", | |
| "outside": "19.78" | |
| }, | |
| { | |
| "date": "2015-08-10 08:43:52.259654", | |
| "inside": "25.125", |
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
| Sub r() | |
| Dim s As Workbook | |
| For i = 1 To Application.Workbooks.Count | |
| Set s = Application.Workbooks.Item(i) | |
| s.Activate | |
| s.Sheets(1).Range("A1").Select | |
| Cells.Replace What:="오전", Replacement:="AM", LookAt:=xlPart, SearchOrder _ |
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
| ' http://stackoverflow.com/a/8525125/592817 | |
| Sub InsertImage() | |
| Dim urlColumn As Range | |
| Dim imgColumn As Range | |
| Dim fp As String | |
| Set urlColumn = Worksheets(1).UsedRange.Columns("W") | |
| Set imgColumn = Worksheets(1).UsedRange.Columns("X") | |
| Dim i As Long | |
| For i = 2 To urlColumn.Cells.Count |