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
| ffmpeg -i input.avi -c:v libx264 -crf 19 -preset slow -c:a aac -strict experimental -b:a 192k -ac 2 out.mp4 |
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
| declare @ids table (id int) | |
| insert into @ids | |
| select [id] as ids from [table_name] where [column_name] is not null | |
| SELECT * FROM [another_table_name] where [id] in (select top 2000 id from @ids) |
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
| $username = "" | |
| $password = "" | |
| $url = "" | |
| $securePassword = ConvertTo-SecureString $password -AsPlainText -Force | |
| $credential = New-Object System.Management.Automation.PSCredential ($username, $securePassword) | |
| $stream = Invoke-WebRequest -Uri url -Credential $credential | |
| Write-Host $stream.content |
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
| GO_SERVER_DATE %{YEAR}-%{MONTHNUM}-%{MONTHDAY} %{HOUR}:%{MINUTE}:%{SECOND},%{INT} | |
| GO_SERVER %{GO_SERVER_DATE:timestamp}%{SPACE}%{LOGLEVEL:log_level} \[%{DATA:field1}\] %{NOTSPACE:field2} |
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
| cmd /c "rmdir /S /Q \\remote_hostname_or_ip\c$\target_directory" |
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
| #!/usr/bin/env bash | |
| for file in *.mp4; | |
| do | |
| ffmpeg -i "$file" -codec:a libmp3lame -qscale:a 2 "${file:0:${#file} - 4}".mp3 | |
| done |
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
| brew tap homebrew/versions | |
| brew install v8-315 | |
| bundle config build.libv8 --with-system-v8 --with-v8-dir=/usr/local/opt/v8-315 | |
| bundle config build.therubyracer --with-system-v8 --with-v8-dir=/usr/local/opt/v8-315 | |
| bundle |
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
| public class QueryableActiveRecord<T> : ActiveRecordBase<T> | |
| { | |
| public static IOrderedQueryable<T> Queryable() | |
| { | |
| ISession session = holder.CreateSession(typeof(T)); | |
| return new NhQueryable<T>((ISessionImplementor)session); | |
| } | |
| } |
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
| buildscript { | |
| repositories { | |
| maven { | |
| url "http://127.0.0.1:8021/nexus/content/repositories/gradle/" | |
| } | |
| } | |
| } | |
| repositories { | |
| maven { |
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
| backend default { | |
| .host = "www.tonghaohui.com"; | |
| .port = "80"; | |
| } | |
| sub vcl_recv { | |
| set req.backend = default; | |
| if (req.url ~ "^/w/") { | |
| return(pass); | |
| } |