doc_id
stringlengths
36
36
metadata
dict
input
stringlengths
28
4.3k
output
stringlengths
11
5.45k
61b1301c-7ef9-4c3a-9b68-9664bf88bd99
{ "language": "AutoHotkey" }
```autohotkey ``` Add simple AHK script to test mouse wheel jumping
```autohotkey ~WheelDown:: GoingDown := True if GoingUp { MsgBox, , Problem, Mouse wheel is jumping VarSetCapacity(GoingDown,0) } return ~WheelUp:: GoingUp := True if GoingDown { MsgBox, , Problem, Mouse wheel is jumping VarSetCapacity(GoingUp,0) } return```
13f22ec8-1751-401a-b8c8-ef6fa326b77f
{ "language": "AutoHotkey" }
```autohotkey ``` Update for new login window
```autohotkey email = %1% passwrd = %2% Checkd() { WinWait Blizzard App Login, ,3 WinMove 0, 0 WinActivate IfWinNotActive { Checkd() } if ErrorLevel { MsgBox unable to find Battle.net login window. Please record trying to login and report it at j20.pw/bnethelp ...
524a4cc2-e528-429b-a7ba-a66eee5248e2
{ "language": "AutoHotkey" }
```autohotkey ``` Add AHK for leftover debug dialog at completion of install/uninstall
```autohotkey #NoEnv SendMode Input SetWorkingDir %A_ScriptDir% SetTitleMatchMode, 1 ;matches if title begins with string DetectHiddenText, off ;will not search hidden window text DetectHiddenWindows, off ;will not detect hidden windows WinWait, Sandboxie ahk_class #32770, DONE, 120 WinActivate Send,{Enter} ExitApp...
5fbf9edf-1d61-4d8f-b48b-141295dce7c3
{ "language": "AutoHotkey" }
```autohotkey ``` Add a script to launch the 'keep window on top' from other programs
```autohotkey #NoTrayIcon #Persistent #SingleInstance force #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir ...
2479d4ea-d479-4658-8147-90fea72829cf
{ "language": "AutoHotkey" }
```autohotkey ``` Add AHK script to reset cursor position for all pages in a section
```autohotkey #NoEnv #NoTrayIcon #SingleInstance force #Warn SendMode Input SetTitleMatchMode, 3 SetWorkingDir, %A_ScriptDir% procName := "ONENOTE.EXE" ; Set cursor to page title for all pages in the current section !q:: IfWinActive, ahk_exe %ProcName% { Send !{Home} Loop, 31 { Send ^+T Send ...
98f2c98a-8b3b-4b8c-b8d9-7a9ec4f9f2dd
{ "language": "AutoHotkey" }
```autohotkey ``` Add AutoHotkey configuration for np2
```autohotkey ; Muhenkan (PC98 NFER key) LWin::Send {vk1D} ; Henkan (PC98 XFER key) ;RWin::Send {vk1C} ;^RWin::Send {vk1C} AppsKey::Send {vk1C} ^AppsKey::Send ^{vk1C} ;Muhenkan / 無変換 -> {vk1D} ;Henkan / 変換 -> {vk1C} ;Kana / かな -> {vkF2} ;IME ON/OF -> {vkF3}, {vkF4} ```
c1b66b6d-4b34-4b57-829f-c45e7f128a29
{ "language": "AutoHotkey" }
```autohotkey ``` Add small windows autohotkey script.
```autohotkey Capslock::Ctrl ; Window management #h::SendEvent #{Left} #l::SendEvent #{Right} #j::SendEvent #{Down} #k::SendEvent #{Up} ; Windows Explorer Navigation #IfWinActive, ahk_class CabinetWClass ^h:: ControlGet renamestatus,Visible,,Edit1,A ControlGetFocus focussed, A if(renamestatus!=1&&(focussed...
9fe0c943-789a-4c87-8921-aef0e05da8c7
{ "language": "Awk" }
```awk #!/usr/bin/awk -f BEGIN { # Determines whether to print 'Unreleased' banner at top UNRELEASED_COMMITS = 1 # Prefixes that determine whether a commit will be printed CHANGELOG_REGEX = "^(changelog|fix|docs|chore|feat): " FS="|" while ("git log --pretty='%D|%s|%H'" | getline) { IS_GIT_TAG = length($1) && m...
```awk #!/usr/bin/awk -f BEGIN { # Determines whether to print 'Unreleased' banner at top UNRELEASED_COMMITS = 1 # Prefixes that determine whether a commit will be printed CHANGELOG_REGEX = "^(changelog|fix|docs|chore|feat|feature|refactor|update): " FS="|" while ("git log --pretty='%D|%s|%H'" | getline) { IS_G...
f7bf21e4-6737-4a08-9d3e-3dad74fa93a4
{ "language": "Awk" }
```awk # awk script to convert symbol export table formats # converts an msvc .def file to an darwin ld export-symbols-list file # we only support the most basic module definition syntax # skip comments /^\w*#.*/ {next} /^\w*;.*/ {next} # remember and propagate the library name /LIBRARY/ {name = $2; print "\# export...
```awk # awk script to convert symbol export table formats # converts an msvc .def file to an darwin ld export-symbols-list file # we only support the most basic module definition syntax # skip comments /^\w*#.*/ {next} /^\w*;.*/ {next} # remember and propagate the library name /LIBRARY/ {name = $2; print "# export ...
d1f6c1cd-d12e-4edf-8464-668666ad7c48
{ "language": "Awk" }
```awk # Print lines from a WebScraper csv file after joining extra newlines # INVOCATION: # awk -f fixExtraLinesFrom-webscraper.awk BritBoxPrograms.csv { if (/^"/) printf ("\n" $0) else printf } ``` Make sure newline at end of file
```awk # Print lines from a WebScraper csv file after joining extra newlines # INVOCATION: # awk -f fixExtraLinesFrom-webscraper.awk BritBoxPrograms.csv { if (/^"/) printf ("\n" $0) else printf } END { printf ("\n") } ```
82f7fac8-f43e-4e7d-8cb9-b6fa95853bd8
{ "language": "Awk" }
```awk { if (1==NR) { startTimestamp = substr($1, 2, length($1) - 2) printf(";$FILEVERSION=1.3\n") printf(";$STARTTIME=%u.%u\n", mktime(strftime("%Y %m %d 0 0 0", startTimestamp)) / 86400 + 25569, \ 10000000000 / 86400 * (mktime(strftime("%Y %m %d %H %M %S", startTimestam...
```awk { if (1==NR) { startTimestamp = substr($1, 2, length($1) - 2) printf(";$FILEVERSION=1.3\n") printf(";$STARTTIME=%u.%.0f\n", mktime(strftime("%Y %m %d 0 0 0", startTimestamp)) / 86400 + 25569, \ 10000000000.0 / 86400.0 * (mktime(strftime("%Y %m %d %H %M %S", startTi...
8c938945-ac5d-4b67-a763-5c54621b5eb5
{ "language": "Awk" }
```awk #!/usr/bin/awk -f BEGIN { # Determines whether to print 'Unreleased' banner at top UNRELEASED_COMMITS = 1 # Prefixes that determine whether a commit will be printed CHANGELOG_REGEX = "^(changelog|fix|docs|chore|feat|feature|refactor|update): " FS="|" while ("git log --pretty='%D|%s|%H'" | getline) { IS_G...
```awk #!/usr/bin/awk -f BEGIN { REPO_URL = getRepoURL() # Prefixes that determine whether a commit will be printed CHANGELOG_REGEX = "^(changelog|fix|docs|chore|feat|feature|refactor|update): " FS="|" # %D: tags # %s: commit message # %H: long hash # %h: short hash while ("git log --pretty='%D|%s|%H|%h'" | ge...
0a758377-c5f9-4e60-9778-673179ed89b7
{ "language": "Awk" }
```awk #!/usr/bin/env awk -f # # Computes the median. # # Usage: median # # Input: # - a column of numbers # # Output: # - median value BEGIN { i = 0 } { a[i++] = $1 } END { j = i/2 if ( i%2 == 1 ) { median = a[int(j)] } else { median = (a[j] + a[j-1])/2 } print median } ``` Clarify that input must be ...
```awk #!/usr/bin/env awk -f # # Computes the median. # # Usage: median # # Input: # - a sorted column of numbers # # Output: # - median value BEGIN { i = 0 } { a[i++] = $1 } END { j = i/2 if ( i%2 == 1 ) { median = a[int(j)] } else { median = (a[j] + a[j-1])/2 } print median } ```
5aad16c4-65ce-46e2-ab58-c30d285076d5
{ "language": "Awk" }
```awk BEGIN { FS = "\n"; } /Targets:/ { while (getline && $0 != "") { if ($0 ~ /Tests/) continue; sub(/^ +/, ""); print; } } ``` Exclude any target with "Test" in the name
```awk BEGIN { FS = "\n"; } /Targets:/ { while (getline && $0 != "") { if ($0 ~ /Test/) continue; sub(/^ +/, ""); print; } } ```
31fa18d1-a949-45ed-a9b0-5bde5c6761f4
{ "language": "Awk" }
```awk #!/usr/bin/awk # # Patch the generated wrapper Swift code to handle special cases # BEGIN { depr_init = 0 } /open .* ColorSelection/ { depr_init = 1 } /public .* ColorSelection/ { depr_init = 1 } /public .* HSV/ { depr_init = 1 } /open .* HSV/ { depr_init = 1 } / init.. {/ { if (depr_init) { printf("@availabl...
```awk #!/usr/bin/awk # # Patch the generated wrapper Swift code to handle special cases # BEGIN { depr_init = 0 ; comment = 0 } /open .* ColorSelection/ { depr_init = 1 } /public .* ColorSelection/ { depr_init = 1 } /public .* HSV/ { depr_init = 1 } /open .* HSV/ { depr_init = 1 } /open .* HSV/ { depr_init = 1 } /func...
47465dde-8bc2-46a9-ac95-7255d83e9194
{ "language": "Awk" }
```awk BEGIN { print "V1.0 {"; print " global:"; } { # Remove the CR character in case the sources are mapped from # a Windows share and contain CRLF line endings gsub(/\r/,"", $0); # Skip empty lines and comment lines starting with semicolon if (NF && !match($0, /^[[:space:]]*;/)) { print " " ...
```awk BEGIN { print "V1.0 {"; print " global:"; } { # Remove the CR character in case the sources are mapped from # a Windows share and contain CRLF line endings gsub(/\r/,"", $0); # Skip empty lines and comment lines starting with semicolon if (NF && !match($0, /^[:space:]*;/)) { print " " $0...
9c921d0c-7c75-4229-a32e-4c29f95c5a2c
{ "language": "Awk" }
```awk #!/bin/awk # # $Id$ { if (NR == 1) { print } else { for (i = 1; i <= NF; i++) { if ($i ~ /^include\// || $i ~ /^src\// || $i ~ /^obj\// || $i == "\\") printf " " $i } print "" } } ``` Include header files whose path begins with ../ .
```awk #!/bin/awk # # $Id$ { if (NR == 1) { print } else { for (i = 1; i <= NF; i++) { if ($i ~ /^include\// || $i ~ /^src\// || $i ~ /^obj\// || $i ~ /^\.\.\// || $i == "\\") printf " " $i } print "" } } ```
3d9936c0-79a4-4a7c-8e67-5d1161bc98b8
{ "language": "Awk" }
```awk BEGIN{ now = systime() format = "%Y/%m/%d %H:%M:%S" } { split($1, DATE, "/") split($2, TIME, ":") $1 = "" $2 = "" t = mktime(DATE[1] " " DATE[2] " " DATE[3] " " TIME[1] " " TIME[2] " " TIME[3]) if (delta == "") { del...
```awk BEGIN{ now = systime() format = "%Y/%m/%d %H:%M:%S" } { split($1, DATE, "/") split($2, TIME, ":") t = mktime(DATE[1] " " DATE[2] " " DATE[3] " " TIME[1] " " TIME[2] " " TIME[3]) if (delta == "") { delta = now - t } o...
790f1b44-1fd1-4102-983e-3b92d71801ea
{ "language": "Awk" }
```awk BEGIN{doit = 0} { if (doit) print $0 } $0 == "%%EndSetup" { doit = 1 } ``` Fix awk script to work with cairo generated postscript
```awk BEGIN{doit = 0} { if (doit) print $0 } $0 = /%%End.*Setup/ { doit = 1 } ```
188b7040-a661-405d-a2eb-ee8e915d4103
{ "language": "Awk" }
```awk #!/usr/bin/awk -f BEGIN { FS = "," } $1 == "pld" { p += $2 } $1 == "val" { v += $2 } { "date -d "$3" +%B" | getline month monthly[month][$1] += $2 categorically[$1][$4] += $2 } END { print "Val spent "v"€" print "PLD spent "p"€" if ( p < v ) print "PLD owe "v - p"€ to val." else ...
```awk #!/usr/bin/awk -f BEGIN { FS = "," } $1 == "pld" { p += $2 } $1 == "val" { v += $2 } { "date -d "$3" '+%B %Y'" | getline month_and_year monthly[month_and_year][$1] += $2 categorically[$1][$4] += $2 } END { print "Val spent "v"€" print "PLD spent "p"€" if ( p < v ) print "PLD owe "v - p...
ba96f3fa-2d16-4c65-9932-7b79e2267b43
{ "language": "Awk" }
```awk # # Parsing output of: # # hdfs dfs -du -s '/user/*' # function dbstr(s) { if (s) { return "'" s "'" } else { return "NULL" } } function dbi(i) { if (i >= 0) { return i } else { return "NULL" } } BEGIN { FS="[ \t/]+" print "INSERT INTO measure (name) VALUES ('quota');"; } { used=$1 user=$4 print "IN...
```awk # # Parsing output of: # # hdfs dfs -du -s '/user/*' # function dbstr(s) { if (s) { return "'" s "'" } else { return "NULL" } } function dbi(i) { if (i >= 0) { return i } else { return "NULL" } } BEGIN { FS="[ \t/]+" print "INSERT INTO measure (name) VALUES ('quota');"; } /^[0-9]+[ ]+[0-9]+[ ]+\/.*/ ...
f002b54c-70d0-4af8-9c51-09e47e0ffc5d
{ "language": "Awk" }
```awk { title = $0 if (match (title, /, The"$/)) { sub (/^"/,"\"The ", title) sub (/, The"$/,"\"", title) } printf ("echo ==\\> %3d: %s\n",NR,title) >> TITLES_SCRIPT printf ("./getIMDbInfoFrom-titles.py %s\n",title) >> TITLES_SCRIPT printf ("echo \n\n") >> TITLES_SCRIPT pri...
```awk { title = $0 if (match (title, /, The"$/)) { sub (/^"/,"\"The ", title) sub (/, The"$/,"\"", title) } if (FILENAME ~ /Acorn/) KEY = "A" if (FILENAME ~ /BBox/) KEY = "B" if (FILENAME ~ /MHz/) KEY = "M" if (FILENAME ~ /Watched/) KEY =...
ad3728ab-710b-4c61-9dcf-bfc0e70c7945
{ "language": "Awk" }
```awk BEGIN { session_count = 0; FS="|" OFS="|" } { if ($3 ~ "[0-9]+") { # See if the current line is already in the table frame_file = destDir "/frames/Frame"$3".html" session_line = "" "grep -i \"" session_token "\" " frame_file | getline session_line if (session_line == "" ) { $6...
```awk BEGIN { session_count = 0; FS="|" OFS="|" } { if ($3 ~ "[0-9]+") { # See if the current line is already in the table frame_file = destDir "/frames/Frame"$3".html" session_line = "" "grep -i \"" session_token "\" " frame_file | getline session_line close(grep) if (session_line ==...
edd29c83-81d9-4eb7-936c-fcb5ef22b18d
{ "language": "Awk" }
```awk ############################################################################### # BRLTTY - A background process providing access to the console screen (when in # text mode) for a blind person using a refreshable braille display. # # Copyright (C) 1995-2006 by The BRLTTY Developers. # # BRLTTY comes with...
```awk ############################################################################### # BRLTTY - A background process providing access to the console screen (when in # text mode) for a blind person using a refreshable braille display. # # Copyright (C) 1995-2006 by The BRLTTY Developers. # # BRLTTY comes with...
309c52ad-827a-4e88-8591-c7209c7df675
{ "language": "Awk" }
```awk #!/usr/bin/awk -f # # Adds github compatible labels to level 1 and 2 markdown headings # in underline style. # # # Substitute github references with doxygen references. # /\(#[_a-z0-9-]*\)/ { gsub(/\(#[_a-z0-9-]*\)/, "<__REF__&__REF__>") gsub(/<__REF__\(#/, "(@ref ") gsub(/\)__REF__>/, ")") } # # If this li...
```awk #!/usr/bin/awk -f # # Adds github compatible labels to level 1 and 2 markdown headings # in underline style. # # # Get file name prefix for references. # filename != FILENAME { filename = FILENAME # strip path "pwd" | getline path path = path "/" prefix = substr(filename, 1, length(path)) == path \ ...
5f719b07-7382-4d88-8a12-0c495f8f0f2c
{ "language": "Awk" }
```awk BEGIN { } function extension(str){ n = split(str, parts, ".") if (n == 1){ return "<NO EXTENSION>" } else { return parts[n] } } $2 != "total" { by_type[extension($2)] += $1 } $2 ~ "CMakeLists.txt" { #cmake should not count as text by_type["txt"] -= $1 by_type["cmake"] += $1 } $2 ~ "te...
```awk BEGIN { } function getExtension(str){ n = split(str, parts, ".") if (n == 1){ return "<NO EXTENSION>" } else { return parts[n] } } $2 != "total" { by_type[getExtension($2)] += $1 } $2 ~ "CMakeLists.txt" { #cmake should not count as text by_type["txt"] -= $1 by_type["cmake"] += $1 } $2...
e2a3fa41-9072-4d9c-b18f-0a26ffdfec16
{ "language": "Awk" }
```awk { content = $1 ~ /^(content|skin|locale)$/ } content && $NF ~ /^[a-z]/ { $NF = "/" name "/" $NF } content { sub(/^\.\./, "", $NF); $NF = "jar:chrome/" name ".jar!" $NF } { sub("^\\.\\./liberator/", "", $NF) print } ``` Fix the modules path in the xpi chrome.manifests
```awk { content = $1 ~ /^(content|skin|locale)$/ } content && $NF ~ /^[a-z]/ { $NF = "/" name "/" $NF } content { sub(/^\.\./, "", $NF); $NF = "jar:chrome/" name ".jar!" $NF } { sub("^\\.\\./common/", "", $NF) print } ```
09e73d2a-e5e6-4c29-8fa4-9bd7c7b0b88a
{ "language": "Awk" }
```awk # Generate MHz_TV_Shows_minutes.csv by processing SHORT_SPREADSHEET to figure # average episode length # BEGIN { FS = "\t" } /^Title/ { printf ("%s\t%s\t%s\t%s\tAvg Len\t%s\t%s\t%s\t%s\t%s\n", $1,$2,$3,$4,$5,$6,$7,$8,$9) } /=HYPERLINK/ { dur=$4 sub (/h/,"",dur) sub (/m/,"",dur...
```awk # Generate MHz_TV_Shows_minutes.csv by processing SHORT_SPREADSHEET to figure # average episode length # BEGIN { FS = "\t" } /^Title/ { printf ("%s\t%s\t%s\t%s\tAvg Len\t%s\t%s\t%s\t%s\t%s\n", $1,$2,$3,$4,$5,$6,$7,$8,$9) } /=HYPERLINK/ { dur=$4 sub (/h/,"",dur) sub (/m/,"",dur...
a6e74fff-1dfd-46eb-9d52-98702a7beea9
{ "language": "Awk" }
```awk BEGIN { print "V1.0 {"; print " global:"; } { # Remove the CR character in case the sources are mapped from # a Windows share and contain CRLF line endings gsub(/\r/,"", $0); # Skip empty lines and comment lines starting with semicolon if (NF && !match($0, /^[:space:]*;/)) { print " " $0...
```awk BEGIN { print "V1.0 {"; print " global:"; } { # Remove the CR character in case the sources are mapped from # a Windows share and contain CRLF line endings gsub(/\r/,"", $0); # Skip empty lines and comment lines starting with semicolon if (NF && !match($0, /^[ \t]*;/)) { print " " $0 ";"...
6ca47e06-0b81-4f1c-b12e-75efb32ce40e
{ "language": "Awk" }
```awk # # Converts the output of 'nm' into a C source containing an array of symbols # that correspond to functions (t and T in terms of 'nm'). # # Usage: # nm -n image | awk -f nm2c.awk # # Date: Aug 28, 2012 # Author: Eldar Abusalimov # BEGIN { print "/* Auto-generated file. Do not edit. */"; print ""; prin...
```awk # # Converts the output of 'nm' into a C source containing an array of symbols # that correspond to functions (t and T in terms of 'nm'). # # Usage: # nm -n image | awk -f nm2c.awk # # Date: Aug 28, 2012 # Author: Eldar Abusalimov # BEGIN { print "/* Auto-generated file. Do not edit. */"; print ""; prin...
09a301cb-10b0-43d0-bd31-02527002156e
{ "language": "Awk" }
```awk BEGIN { FS="\n" OFS="" ORS="\n" print "#!/bin/sh" print " " } # blank lines /^$/ { next } # record header $1 ~ /^\*\*\*\*/ { next } # summary field $1 ~ /^[ ]*summary\:/ { gsub(/\r/,""); idx = match($1, /summary\:(.*)/) print "SUMMARY=\"" substr($1, idx + 9) "\"" next } # ...
```awk BEGIN { FS="\n"; OFS=""; ORS="\n"; print "#!/bin/sh"; print "#"; } # blank lines /^$/ { next; } # record header $1 ~ /^\*\*\*\*/ { next; } # summary field $1 ~ /^[ ]*summary\:/ { gsub(/\r/,""); idx = match($1, /summary\:(.*)/); print "SUMMARY=\"" substr($1, idx + 9) "\""; ...
377eb37c-2aa1-4d8d-be7c-9154c5e4e0a2
{ "language": "Awk" }
```awk #!/usr/bin/awk -f BEGIN { FS = OFS = "\t"; } { len = split($3, words, ", "); if (length(N) > 0 && len >= N) next; for (i = 1; i <= len - 1; i++) { for (j = i + 1; j <= len; j++) { print words[i], words[j], ORS, words[j], words[i] | "sort --parallel=$(nproc) -us"; } ...
```awk #!/usr/bin/awk -f BEGIN { FS = "\t"; OFS = ""; } { len = split($3, words, ", "); if (length(N) > 0 && len >= N) next; for (i = 1; i <= len - 1; i++) { for (j = i + 1; j <= len; j++) { print words[i], FS, words[j], ORS, words[j], FS, words[i] | "sort --parallel=$(nproc) ...
85db9573-0fde-4c33-8834-653cfcc746c4
{ "language": "Awk" }
```awk { if (1==NR) { startTimestamp = substr($1, 2, length($1) - 2) printf(";$FILEVERSION=1.3\n") printf(";$STARTTIME=%u.%u\n", mktime(strftime("%Y %m %d 0 0 0", startTimestamp)) / 86400 + 25569, \ 10000000000 / 86400 * (mktime(strftime("%Y %m %d %H %M %S", startTimestam...
```awk { if (1==NR) { startTimestamp = substr($1, 2, length($1) - 2) printf(";$FILEVERSION=1.3\n") printf(";$STARTTIME=%u.%u\n", mktime(strftime("%Y %m %d 0 0 0", startTimestamp)) / 86400 + 25569, \ 10000000000 / 86400 * (mktime(strftime("%Y %m %d %H %M %S", startTimestam...
e7009a76-320a-4ca2-b687-776f5a22aced
{ "language": "Awk" }
```awk #!/usr/bin/awk # # Patch the generated wrapper Swift code to handle special cases # BEGIN { etpInit = 0 } /public convenience init.T: ErrorTypeProtocol./ { etpInit = 1 print " /// Convenience copy constructor, creating a unique copy" print " /// of the passed in Error. Needs to be freed using free()" ...
```awk #!/usr/bin/awk # # Patch the generated wrapper Swift code to handle special cases # BEGIN { etpInit = 0 ; vaptrptr = 0 } /public convenience init.T: ErrorTypeProtocol./ { etpInit = 1 print " /// Convenience copy constructor, creating a unique copy" print " /// of the passed in Error. Needs to be freed ...
e27a5cd7-b054-4e99-9825-2a9dc29f0764
{ "language": "Awk" }
```awk # $Id: ndcedit.awk,v 1.4 1997/02/22 16:08:19 peter Exp $ NR == 3 { print "#" print "# This file is generated automatically, do not edit it here!" print "# Please change src/usr.sbin/ndc/ndcedit.awk instead" print "#" print "" print "# If there is a global system configuration file, suck it in." print "if...
```awk # $Id: ndcedit.awk,v 1.5 1997/05/27 07:19:57 jkh Exp $ NR == 3 { print "#" print "# This file is generated automatically, do not edit it here!" print "# Please change src/usr.sbin/ndc/ndcedit.awk instead" print "#" print "" print "# If there is a global system configuration file, suck it in." print "if [...
7e4fb15e-9386-4fb5-85a7-ef1e830127bd
{ "language": "Awk" }
```awk BEGIN { FS = "\"" } /\/us\/movie\// { numMovies += 1 shortURL = $6 printf ("%s \"https://www.britbox.com%s\"", trailingComma, shortURL) >> EPISODES_JSON_FILE trailingComma = ",\n" } /\/us\/show\// { numShows += 1 shortURL = $6 printf ("%s \"https://www.britbox.com%s\"", tr...
```awk BEGIN { FS = "\"" } /\/us\/movie\// { numMovies += 1 shortURL = $6 printf ("%s \"https://www.britbox.com%s\"", trailingEpisodesComma, shortURL) \ >> EPISODES_JSON_FILE trailingEpisodesComma = ",\n" } /\/us\/show\// { numShows += 1 shortURL = $6 printf ("%s \"https:...
1869ffd9-c187-4bc5-8fa7-77d12908a355
{ "language": "Awk" }
```awk ``` Add script for generating vendor header include lines
```awk # Usage: awk -f <this_script> vendor/MKxxxx.h vendor/MKxxyy.h vendor/MKzzz.h ... /Processor[s]?:/ { i=0; if (FNR == NR) { printf "#if"; } else { printf "#elif"; } while(match($0, /MK.*/)) { if (i>0) { printf " || \\\n "; } printf " defined...
6f7b1372-556a-48d3-978d-17786ab56705
{ "language": "Awk" }
```awk ``` Add new script for gln testing report
```awk #!/usr/bin/awk -f # cat *.tdb | tdbout -t publisher,plugin,publisher:info[tester],status BEGIN { FS="\t" pn = 0 } { nn = split($2,na,/\./) lp2 = na[nn] if (!(($1,lp2) in b)) { p[pn] = $1 n[pn] = lp2 # n[pn] = $2 r[pn] = $3 pn++ } b[$1,lp2]++ c[$1,lp2,$4]...
5134effe-011c-4594-a064-8dd5a301bfd8
{ "language": "Awk" }
```awk ``` Add AWK script to generate a frequency table from a column of numbers
```awk #!/usr/bin/env awk -f # # Generates a frequency table. # # Usage: frequency_table # # Input: # - a column of numbers # # Output: # - frequency table { total += 1 table[$1] += 1 } END { for (v in table) { count = table[v] print v OFS count OFS count/total } } ```
f1c6e70a-4f1e-4b97-b454-8cdd58109958
{ "language": "Awk" }
```awk ``` Add Tobias Waldekranz's awesome little AWK script
```awk # Calculate network address from IP and prefix len # Tobias Waldekranz, 2017 # # $ echo "192.168.2.232/24" | awk -f ipcalc.awk # 192.168.2.0/24 # # $ echo "192.168.2.232.24" | awk -f ipcalc.awk # 192.168.2.0/24 # # $ echo "192.168.2.232 24" | awk -f ipcalc.awk # 192.168.2.0/24 # BEGIN { FS="[. /]" } ...
4e1c0134-916f-469c-979d-191514f2803e
{ "language": "Awk" }
```awk ``` Add an awk script used in one-vs-the-rest classification example.
```awk BEGIN{ FS="\t"; OFS="\t"; } { possible_labels=$1; rowid=$2; label=$3; features=$4; label_count = split(possible_labels, label_array, ","); for(i = 1; i <= label_count; i++) { if (label_array[i] == label) print rowid, label, 1, features; else print rowid, label_arra...
5e960284-6300-43f9-844a-8b6e52036765
{ "language": "Awk" }
```awk ``` Add script to convert old submission format to new format.
```awk #!/usr/bin/env awk -f { for (i = 1; i <= NF; i++) { if (i == 3) printf "-1 "; printf $i" " } printf "\n" }```
bf88c069-cbfc-4698-a2f8-5d2367e87858
{ "language": "Awk" }
```awk ``` Add crosscheck of EPISODES with SEASONS
```awk # WebScraper has problems getting incomplete data. # # Crosscheck the info in EPISODES with the info in SEASONS. Count up episodes # and compare with the number of episodes listed in the seasons file. # For now these seem more likely a problem in scraping SEASONS than EPISODES # so it could be these are false p...
77003028-fe7f-40f8-8e3a-e35965496fdd
{ "language": "Awk" }
```awk ``` Add parser for Z3's get-model output.
```awk #!/usr/bin/gawk -f BEGIN{ bees=""; } /^[ ]+\(define-fun.*Int$/{ bees = $2; } /^[ ]+[0-9]+\)/{ match ($0, /^[ ]+([0-9]+)\)/, arr) print bees " " arr[1]; } ```
1a2c865b-d626-4356-8743-e36f518c58a1
{ "language": "Awk" }
```awk ``` Add awk solution to problem 16
```awk #!/usr/bin/awk -f { protein = "" flag = 0 # Get rid of line with label while (("curl -Ls http://www.uniprot.org/uniprot/"$1".fasta" | getline prot_line) > 0) { if (flag) # Append line to protein protein = protein prot_line else # We're on the fi...
aa5542a8-427d-4fcd-8d7a-dccb1ce97a94
{ "language": "Awk" }
```awk ``` Add a crosscheck for the SEASONS_SORTED_FILE
```awk # Crosscheck the number of episodes of each show found by counting them (grep -c) # in EPISODES_SORTED_FILE versus the number added up from SEASONS_SORTED_FILE # Both numbers are found by processing a checkEpisodeInfo file # # For now these seem more likely a problem in scraping SEASONS_SORTED_FILE than EPISODES...
671d2183-6b5c-4c31-ad47-e2e0b31e3673
{ "language": "Awk" }
```awk ``` Add AWK script to merge comma-terminated lines
```awk #!/usr/bin/awk -f # # AWK script to join multiple lines if the preceeding line ends with a comma (,). # # For example: # # 1, # 2, # 3 # # Turns into: # # 1, 2, 3 # /,$/ { ORS="" print $0 do { getline print $0 } while ($0 ~ /,$/) ORS="\n" print "" } ```
e1437fa7-af32-40f1-9084-6035ed3f699d
{ "language": "Awk" }
```awk ``` Add Netflix specific link generator
```awk # Helper for converting Netflix "viewing activity" into hyperlinks # # <a href="/title/80988960" data-reactid="68">Death in Paradise: Season 6: &quot;Man Overboard, Part 2&quot; # <a href="/title/80170369" data-reactid="124">Ugly Delicious: Season 1: &quot;Pizza&quot; # <a href="/title/80190361" data-reactid="1...
b27ae15e-c07c-4156-8a05-8f7689e7b4da
{ "language": "Awk" }
```awk ``` Add AWK script to compute the corrected sample standard deviation
```awk #!/usr/bin/env awk -f # # Computes the corrected sample standard deviation. # # Usage: stdev # # Input: # - a column of numbers # # Output: # - corrected sample standard deviation # # Notes: # - Uses [Welford's method][1]. # # [1]: https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Online_al...
2599a817-d637-49b7-9a3b-2977f832d319
{ "language": "Awk" }
```awk ``` Make script to process top level BritBox shows
```awk BEGIN { FS="\t" print "Sortkey\tTitle\tSeasons\tDuration\tYear\tRating\tDescription" } # if needed for debugging record placment, replace "/nosuchrecord/" below /nosuchrecord/ { print "" print NR " - " $0 for ( i = 1; i <= NF; i++ ) { print "field " i " = " $i } } { for ( i ...
21073d71-52bd-447c-90ef-f5284ec497cb
{ "language": "Awk" }
```awk ``` Create helper for Netflix activity
```awk # Helper for converting Netflix "viewing activity" into hyperlinks # # Since there is no way to paste an embedded hyperlink into a text filei, # paste the link and the title on two consecutive lines, e.g. # # https://www.netflix.com/title/80174814 # Borderliner: Season 1: "Milla’s Future" # https://www.netflix.c...
91f10bc3-4d48-4808-b34a-4f1043ee9b69
{ "language": "Awk" }
```awk ``` Add debugging tool which prints WebScraper field names
```awk # Print field numbers and field names from a WebScraper csv file saved in tsv format # INVOCATION: # awk -f printFieldNamesFrom-webscraper.awk -v maxRecordsToPrint=5 BritBoxSeasons-test-tabs.csv BEGIN { FS="\t" # print 3 records unless overridden with "-v maxRecordsToPrint=<n>" if (maxRecordsToPr...
922cd6e6-1ddc-4eb2-a797-d303d0bd308d
{ "language": "Awk" }
```awk ``` Add the unified pair generation script
```awk #!/usr/bin/awk -f BEGIN{ FS = OFS = "\t"; } { split($3, words, ", "); for (i = 1; i <= length(words) - 1; i++) { for (j = i + 1; j <= length(words); j++) { print words[i], words[j]; print words[j], words[i]; } } } ```
bc4a0fbd-88a1-4994-b3df-712383fdea59
{ "language": "Awk" }
```awk ``` Add only unique reads for paired end filter
```awk BEGIN { OFS="\t"; lastid=""; id_counts=0; } { if ( $1 ~ /^@/ ) { # headers go straight through print $0; next; } if (lastid == "") { lastid=$1; r1["read"] = $0; r1["chr"] = $3; r1["tags"] = ""; for(i=12;i<NF;i++) { r1["tags"]=r1["tags"] $i " ";} r1["tags"]=r1["ta...
35790a72-2503-44bd-8d93-ac1e904ac108
{ "language": "Awk" }
```awk ``` Add awk script to deobfuscate wasm stack traces.
```awk # Usage: # awk -f deobfuscate_wasm_log.awk <wat_file> <log_file> # Process the log file which is the 2nd argument. FILENAME == ARGV[2] { match($0, /<anonymous>:wasm-function\[([0-9]+)\]/, groups) print $0, functions[groups[1]] } # Collects function declarations /^\(func/ { functions[last_function++] = $...
da664bf0-3ebf-40d8-93d5-35914b4e3f6d
{ "language": "Awk" }
```awk ``` Add AWK script to compute the mid-range
```awk #!/usr/bin/env awk -f # # Computes the mid-range. # # Usage: mid-range # # Input: # - a column of numbers # # Output: # - mid-range !i++ { # Only for the first record: max = $1 min = $1 } { if ($1 > max) { max = $1 } else if ($1 < min) { min = $1 } } END { print (max + min) / 2 } ```
10a9f331-bd8e-4bb5-aab3-e55b0ffa781b
{ "language": "Awk" }
```awk ``` Add a short program that rewrites the testdata/rsyncd.log timestamps to nowish.
```awk BEGIN{ now = systime() format = "%Y/%m/%d %H:%M:%S" } { split($1, DATE, "/") split($2, TIME, ":") $1 = "" $2 = "" t = mktime(DATE[1] " " DATE[2] " " DATE[3] " " TIME[1] " " TIME[2] " " TIME[3]) if (delta == "") { del...
499a6341-f68e-46ff-acad-424216fd0e8f
{ "language": "Awk" }
```awk ``` Add an awk script for reading CVC's output.
```awk #!/usr/bin/awk -f BEGIN{ outarr[0] = ""; outarr[1] = ""; outarr[2] = ""; outarr[3] = ""; idx = 0; } /.*sparticus.*/{ sub(/bv/, "", $12); outarr[idx] = $12; idx++; if (idx == 4) { print outarr[0] "|" outarr[1] "|" outarr[2] "|" outarr[3] idx = 0; } } ```
0c46ccce-c47a-4a0b-bbed-4a4c1fcaf491
{ "language": "Awk" }
```awk ``` Add for updating the config file
```awk # Invoke as awk addloadexample.awk BEGIN { lms = 0; } tolower($0) ~ /^[# \t]*loadmodule[ \t]/ { if ( $2 == MODULE "_module" ) { print "LoadModule " MODULE "_module " LIBPATH "/mod_" MODULE DSO; lms = 2; next; } # test $3 since # LoadModule is split into two tokens else if ( $3 == MODULE ...
969239af-8847-45d1-ade6-060a95682605
{ "language": "Batchfile" }
```batchfile @echo off start /min java -jar %~dp0SuperTMXMerge.jar %* ``` Improve Windows .bat launcher: waits for close, no console
```batchfile @echo off start /b /wait java -jar %~dp0SuperTMXMerge.jar %* ```
52c6621d-db6d-416f-a2e8-22b04194bf2f
{ "language": "Batchfile" }
```batchfile SET PATH=C:\Qt\5.5\mingw492_32\bin;%PATH% SET PATH=C:\Qt\Tools\mingw492_32\bin;%PATH% qmake.exe -makefile -win32 FLViz.pro mingw32-make.exe clean mingw32-make.exe mocclean mingw32-make.exe mingw32-make.exe distclean ``` Comment out removing stuff for now.
```batchfile SET PATH=C:\Qt\5.5\mingw492_32\bin;%PATH% SET PATH=C:\Qt\Tools\mingw492_32\bin;%PATH% qmake.exe -makefile -win32 FLViz.pro mingw32-make.exe clean mingw32-make.exe mocclean mingw32-make.exe REM mingw32-make.exe distclean ```
f11d1631-0aae-4391-a292-dcbf29a4b7b6
{ "language": "Batchfile" }
```batchfile :: Set $HOME to the current dir so msys runs here set HOME=%cd% :: Configure, build, test, and install using `nmake`. bash -lc "make" if errorlevel 1 exit 1 bash -lc "make PREFIX=$LIBRARY_PREFIX install" if errorlevel 1 exit 1 ``` Use the same arguments on Windows.
```batchfile :: Set $HOME to the current dir so msys runs here set HOME=%cd% :: Configure, build, test, and install using `nmake`. bash -lc "make" if errorlevel 1 exit 1 bash -lc "make DYNAMIC_ARCH=1 BINARY=$ARCH NO_LAPACK=0 NO_AFFINITY=1 USE_THREAD=1 PREFIX=$LIBRARY_PREFIX install" if errorlevel 1 exit 1 ```
5ed13e7d-9458-436a-a7a3-b8b4784ee586
{ "language": "Batchfile" }
```batchfile python %RECIPE_DIR%\download-chromedriver if errorlevel 1 exit 1 7z x chromedriver.zip -ochromedriver if errorlevel 1 exit 1 REM Add chromedriver to PATH so chromedriver_binary install can find it set PATH=%PATH%:%CD%\chromedriver python -m pip install --no-deps --ignore-installed . ``` Fix script path...
```batchfile python %RECIPE_DIR%\download-chromedriver.py if errorlevel 1 exit 1 7z x chromedriver.zip -ochromedriver if errorlevel 1 exit 1 REM Add chromedriver to PATH so chromedriver_binary install can find it set PATH=%PATH%:%CD%\chromedriver python -m pip install --no-deps --ignore-installed . ```
96d3e173-eba6-40ec-a41b-33f5ddcd2be0
{ "language": "Batchfile" }
```batchfile @ECHO OFF set GO_ROOT=%~dp0\..\..\.. set JRUBY_BASE=%GO_ROOT%\tools\jruby set SERVER_ROOT=%GO_ROOT%\server set RAILS_ROOT=%SERVER_ROOT%\webapp\WEB-INF\rails.new set GEM_HOME=%RAILS_ROOT%\vendor\bundle\jruby\1.9 set GEM_PATH=%JRUBY_BASE%\lib\ruby\gems\shared;%GEM_HOME% set PATH=%JRUBY_BASE%\bin;%PATH% set ...
```batchfile @ECHO OFF set GO_ROOT=%~dp0\..\..\.. set JRUBY_BASE=%GO_ROOT%\tools\jruby set SERVER_ROOT=%GO_ROOT%\server set RAILS_ROOT=%SERVER_ROOT%\webapp\WEB-INF\rails.new set GEM_HOME=%RAILS_ROOT%\vendor\bundle\jruby\1.9 set GEM_PATH=%JRUBY_BASE%\lib\ruby\gems\shared;%GEM_HOME% set PATH=%JRUBY_BASE%\bin;%PATH% set ...
f2f6bf00-49a9-4580-bd58-1bc1b1f4944a
{ "language": "Batchfile" }
```batchfile @echo off setlocal EnableDelayedExpansion REM Uploading all modules at once (with one gradle command) does not work any more, so a separate command for each module must be issued SET username=%1 SET apikey=%2 SET modules="Spectaculum-Core" "Spectaculum-Camera" "Spectaculum-Image" "Spectaculum-MediaPlayer...
```batchfile @echo off setlocal EnableDelayedExpansion REM Uploading all modules at once (with one gradle command) does not work any more, so a separate command for each module must be issued SET username=%1 SET apikey=%2 SET modules="Spectaculum-Core" "Spectaculum-Camera" "Spectaculum-Image" "Spectaculum-MediaPlayer...
bafa5cb8-644f-4b2b-8421-cfd0b4788f2e
{ "language": "Batchfile" }
```batchfile @set PATH="%PATH%;C:\Program Files\Java\jdk1.8.0_66\bin" @c:\Windows\system32\cmd.exe /c %USERPROFILE%\Desktop\sh.exe -l ``` Set Java path for BMC
```batchfile @set PATH="%PATH%;C:\Program Files\Java\jdk1.7.0_25\bin" @c:\Windows\system32\cmd.exe /c %USERPROFILE%\Desktop\sh.exe -l ```
124ba46c-a281-4de1-a187-1222a0e7af9f
{ "language": "Batchfile" }
```batchfile @REM Copyright (c) Microsoft. All rights reserved. @REM Licensed under the MIT license. See LICENSE file in the project root for full license information. setlocal set build-root=%~dp0.. rem // resolve to fully qualified path for %%i in ("%build-root%") do set build-root=%%~fi REM -- C -- cd %build-root...
```batchfile @REM Copyright (c) Microsoft. All rights reserved. @REM Licensed under the MIT license. See LICENSE file in the project root for full license information. setlocal set build-root=%~dp0.. rem // resolve to fully qualified path for %%i in ("%build-root%") do set build-root=%%~fi REM -- C -- cd %build-root...
ccdcb93a-28f1-43a7-b493-f67c128d6486
{ "language": "Batchfile" }
```batchfile :start bin\nant\nant.exe -f:spark.build tools build package pause goto start ``` Allow number to be passed in to distribution build
```batchfile if "%1"=="" build-distribution 1 :start bin\nant\nant.exe -f:spark.build tools build package -D:build.number=%1 pause goto start ```
f284cdea-3435-458b-b79f-99146474c663
{ "language": "Batchfile" }
```batchfile @echo off set PROTODIR=D:\GitHub\SteamKit\Resources\Protobufs set PROTOBUFS=base_gcmessages gcsdk_gcmessages dota_gcmessages_client for %%X in ( %PROTOBUFS% ) do ( protoc --descriptor_set_out=%%X.desc --include_imports --proto_path=%PROTODIR% --proto_path=%PROTODIR%\dota --proto_path=%PROTODIR%\steamcli...
```batchfile @echo off set PROTODIR=D:\GitHub\SteamKit\Resources\Protobufs set PROTOBUFS=base_gcmessages gcsdk_gcmessages cstrike15_gcmessages for %%X in ( %PROTOBUFS% ) do ( protoc --descriptor_set_out=%%X.desc --include_imports %%X.proto ) ```
7461056f-c2a8-44ac-8d65-80eafff1134d
{ "language": "Batchfile" }
```batchfile @echo off setlocal set "output=nul" set "times=1" goto :parsePackage :help :: TODO: put something here. goto :eof :usage call :help 1>&2 exit /b 1 :parsePackage if "%~1" == "" goto usage set "package=%~1" shift :parseArgs if "%~1" == "" goto main if /i "%~1" == "-?" goto help if /i "%~1" == "-h...
```batchfile @echo off setlocal set "output=nul" set "times=1" goto :parsePackage :help :: TODO: put something here. goto :eof :usage call :help 1>&2 exit /b 1 :parsePackage if "%~1" == "" goto usage set "package=%~1" shift :parseArgs if "%~1" == "" goto main if /i %1 == "-?" goto help if /i %1 == "-h" goto...
a4965040-ed01-4fe2-a7ff-9ac611bd11c5
{ "language": "Batchfile" }
```batchfile @echo off setlocal EnableDelayedExpansion echo Test discovery started... dir C:\projects\spectre\*Tests.exe /b /s | findstr /v obj > __tmp_gtest.txt echo Testing (Google Test)... set failures=0 FOR /F %%i IN (__tmp_gtest.txt) DO ( echo %%i %%i --gtest_output="xml:%%i.xml" powershell C:\projects\spect...
```batchfile @echo off setlocal EnableDelayedExpansion echo Test discovery started... dir C:\projects\spectre\*Tests.exe /b /s | findstr /v obj > __tmp_gtest.txt echo Testing (Google Test)... set failures=0 FOR /F %%i IN (__tmp_gtest.txt) DO ( echo %%i %%i --gtest_output="xml:%%i.xml" powershell C:\projects\spect...
8d6bd944-d60f-41fb-b967-592a1faa528b
{ "language": "Batchfile" }
```batchfile @echo off REM Make sure to use 32 bit python for this so it runs on all machines C:\Utils\Python\Python32-34\python ./BuildPrjExeSetup.py py2exe C:\Utils\Python\Python32-34\python ./BuildEditorApiExeSetup.py py2exe C:\Utils\Python\Python32-34\python ./BuildReleaseManifesterUpdaterExeSetup.py py2exe C:\Util...
```batchfile @echo off REM Make sure to use 32 bit python for this so it runs on all machines %PYTHONHOME%\python ./BuildPrjExeSetup.py py2exe %PYTHONHOME%\python ./BuildEditorApiExeSetup.py py2exe %PYTHONHOME%\python ./BuildReleaseManifesterUpdaterExeSetup.py py2exe %PYTHONHOME%\python ./BuildOpenInVisualStudio.py py2...
3ff0cae4-f942-440c-aee8-4726122e5896
{ "language": "Batchfile" }
```batchfile SETLOCAL SET VERSION=%1 CALL Scripts\buildpack %VERSION% || exit /B 1 ECHO this should not happen exit /B 1 nuget push .\Artifacts\Mapsui.%VERSION%.nupkg -source nuget.org || exit /B 1 nuget push .\Artifacts\Mapsui.Forms.%VERSION%.nupkg -source nuget.org || exit /B 1 git commit -m %VERSION% -a || exit /B 1...
```batchfile SETLOCAL SET VERSION=%1 CALL Scripts\buildpack %VERSION% || exit /B 1 nuget push .\Artifacts\Mapsui.%VERSION%.nupkg -source nuget.org || exit /B 1 nuget push .\Artifacts\Mapsui.Forms.%VERSION%.nupkg -source nuget.org || exit /B 1 git commit -m %VERSION% -a || exit /B 1 git tag %VERSION% || exit /B 1 git pu...
13f5a702-8d1d-40d6-9a74-51fa26d2ef4d
{ "language": "Batchfile" }
```batchfile ### application.bat - 2015 - HURTAUD ### version ="2" build_hour ="11H00" echo "version${version}"; echo "Copyright company - 2015"; echo "Buil${build_hour"; pause;``` Update header for new member
```batchfile ### application.bat - 2015 - HURTAUD - Pasquier Rodolphe ### version ="2" build_hour ="11H00" echo "version${version}"; echo "Copyright company - 2015"; echo "Buil${build_hour"; pause; ```
81fe7ab1-645d-4a56-a74f-9b6d65fbb161
{ "language": "Batchfile" }
```batchfile @echo off setlocal set OUTDIR=%1 set JSENG=%2 set CYGWIN_ROOT=%~dp0..\..\..\third_party\cygwin\ set GNU_ROOT=%~dp0..\..\..\third_party\gnu\files set PATH=%CYGWIN_ROOT%bin;%GNU_ROOT%;%SystemRoot%;%SystemRoot%\system32 :: Ensure that the cygwin mount points are defined CALL %CYGWIN_ROOT%setup_mount.bat > ...
```batchfile @echo off setlocal set OUTDIR=%1 set JSENG=%2 set CYGWIN_ROOT=%~dp0..\..\..\third_party\cygwin\ set GNU_ROOT=%~dp0..\..\..\third_party\gnu\files :: Fix cp.exe on vista: without this flag, the files that it creates are not accessible. set CYGWIN=nontsec set PATH=%CYGWIN_ROOT%bin;%GNU_ROOT%;%SystemRoot%;%...
a20197f0-cf78-4b78-b106-d29a94cf458f
{ "language": "Batchfile" }
```batchfile rem slink /psx /c /p /rmips=GAME/SETUP.REL @GAME/SETUP.LNK,GAME/SETUP.BIN rem slink /psx /c /p /rmips=GAME/ANDY3.REL @GAME/ANDY3.LNK,GAME/ANDY3.BIN rem slink /psx /c /p /rmips=GAME/JOBY5.REL @GAME/JOBY5.LNK,GAME/JOBY5.BIN psylink /c /p /q /rmips=GAME/SETUP.REL @GAME/SETUP.LNK,GAME/SETUP.BIN psylink /c /p /...
```batchfile rem slink /psx /c /p /rmips=GAME/SETUP.REL @GAME/SETUP.LNK,GAME/SETUP.BIN rem slink /psx /c /p /rmips=GAME/ANDY3.REL @GAME/ANDY3.LNK,GAME/ANDY3.BIN rem slink /psx /c /p /rmips=GAME/JOBY5.REL @GAME/JOBY5.LNK,GAME/JOBY5.BIN rem slink /psx /c /p /rmips=GAME/TITSEQ.REL @GAME/TITSEQ.LNK,GAME/TITSEQ.BIN psylink ...
fba6a5f2-bd8f-48d8-83c0-f5a07fdff521
{ "language": "Batchfile" }
```batchfile :: :: Create output (Cordova) directory :: mkdir www :: :: Install client libraries :: bower install :: :: Add target platform :: :: Comment out the platform(s) your system supports :: grunt platform:add:ios :: grunt platform:add:android :: :: Install cordova plugins :: There quickest option is to ask f...
```batchfile :: :: Create output (Cordova) directory :: mkdir www :: :: Install client libraries :: bower install :: :: Add target platform :: :: Comment out the platform(s) your system supports :: grunt platform:add:ios :: grunt platform:add:android :: :: Install cordova plugins :: There quickest option is to ask f...
bec5b7a7-7082-437d-ace7-eaaeaec2132f
{ "language": "Batchfile" }
```batchfile @rem Copyright 2015 Google Inc. All Rights Reserved. @rem @rem Licensed under the Apache License, Version 2.0 (the "License"); @rem you may not use this file except in compliance with the License. @rem You may obtain a copy of the License at @rem @rem http://www.apache.org/licenses/LICENSE-2.0 @...
```batchfile @rem Copyright 2015 Google Inc. All Rights Reserved. @rem @rem Licensed under the Apache License, Version 2.0 (the "License"); @rem you may not use this file except in compliance with the License. @rem You may obtain a copy of the License at @rem @rem http://www.apache.org/licenses/LICENSE-2.0 @...
be1ffd9e-c0b4-492e-b852-506132bb56e7
{ "language": "Batchfile" }
```batchfile @echo off @echo ... @echo Running reference documentation Build Script, capturing output to buildlog.txt ... @echo Start Time: %time% ..\..\build-support\tools\nant\bin\nant %1 %2 %3 %4 %5 %6 %7 %8 %9 > buildlog.txt @echo ... @echo ************************ @echo Build Complete! @echo **************...
```batchfile @echo off @echo ... @echo Running reference documentation Build Script, capturing output to buildlog.txt ... @echo Start Time: %time% ..\..\build-support\tools\nant\bin\nant %1 %2 %3 %4 %5 %6 %7 %8 %9 > buildlog.txt type buildlog.txt @echo ... @echo ************************ @echo Build Complete! ...
1c509f10-b29d-4676-abe2-cd4a8379b08e
{ "language": "Batchfile" }
```batchfile @echo off py25 setup.py --long-description | py25 web\rst2html.py --link-stylesheet --stylesheet=http://www.python.org/styles/styles.css > ~pypi.html start ~pypi.html ``` Add comment and delete temporary file after use.
```batchfile @echo off REM REM Convert setup.py's long description to HTML and show it. REM py25 setup.py --long-description | py25 web\rst2html.py --link-stylesheet --stylesheet=http://www.python.org/styles/styles.css > ~pypi.html start ~pypi.html del ~pypi.html ```
616c0d38-3a4a-47e7-ad13-7bcbb7cfcc95
{ "language": "Batchfile" }
```batchfile xcopy /y .\sourceforge\svn\trunk\src\pyparsing.py . c:\python27\python c:\python27\scripts\epydoc -v --name pyparsing -o htmldoc --inheritance listed --no-private pyparsing.py ``` Fix relative dir typo in xcopy pyparsing.py command
```batchfile xcopy /y ..\sourceforge\svn\trunk\src\pyparsing.py . c:\python27\python c:\python27\scripts\epydoc -v --name pyparsing -o htmldoc --inheritance listed --no-private pyparsing.py ```
700ea8e2-cd12-484b-b9dd-1db83415918d
{ "language": "Batchfile" }
```batchfile # Verify release SET CURRENT_DIRECTORY=%cd% call scripts\verifyReleaseWindowsSingleCase.bat %CURRENT_DIRECTORY%\cpp 32 STATIC || exit /b 1 call scripts\verifyReleaseWindowsSingleCase.bat %CURRENT_DIRECTORY%\cpp 32 SHARED || exit /b 1 call scripts\verifyReleaseWindowsSingleCase.bat %CURRENT_DIRECTORY%\cp...
```batchfile REM Verify release SET CURRENT_DIRECTORY=%cd% call scripts\verifyReleaseWindowsSingleCase.bat "%CURRENT_DIRECTORY%\cpp" 32 STATIC || exit /b 1 call scripts\verifyReleaseWindowsSingleCase.bat "%CURRENT_DIRECTORY%\cpp" 32 SHARED || exit /b 1 call scripts\verifyReleaseWindowsSingleCase.bat "%CURRENT_DIRECT...
0a97a417-c795-42ea-b989-dddaeaef1b14
{ "language": "Batchfile" }
```batchfile cd VirtIO call buildall.bat cd .. cd NetKVM call buildall.bat cd .. cd viostor call buildall.bat cd .. cd vioscsi call buildall.bat cd .. cd Balloon call buildall.bat cd .. cd vioserial call buildall.bat cd .. cd viorng call buildall.bat cd .. cd pvpanic call buildall.bat cd .. ``` Add vioinput to ...
```batchfile cd VirtIO call buildall.bat cd .. cd NetKVM call buildall.bat cd .. cd viostor call buildall.bat cd .. cd vioscsi call buildall.bat cd .. cd Balloon call buildall.bat cd .. cd vioserial call buildall.bat cd .. cd viorng call buildall.bat cd .. cd vioinput call buildall.bat cd .. cd pvpanic call bui...
b3d8d230-4e69-48b8-8639-d4a6912c11aa
{ "language": "Batchfile" }
```batchfile rem Won't be found because there are no shebang lines on Windows rem python test-script-setup.py rem if errorlevel 1 exit 1 rem python test-script-setup.py | grep "Test script setup\.py" rem if errorlevel 1 exit 1 test-script-manual if errorlevel 1 exit 1 test-script-manual | grep "Manual entry point" if...
```batchfile rem We have to use the absolute path because there is no "shebang line" in Windows python "%PREFIX%\Scripts\test-script-setup.py" if errorlevel 1 exit 1 python "%PREFIX%\Scripts\test-script-setup.py" | grep "Test script setup\.py" if errorlevel 1 exit 1 test-script-manual if errorlevel 1 exit 1 test-scrip...
42ae313b-d56b-42d2-ae58-94a50f0dce10
{ "language": "Batchfile" }
```batchfile @echo off set zipcmd=%~dp0\tools\7z\7z.exe pushd %~dp0\..\.. %zipcmd% a -r -x!scripts -xr!.* -x!__pycache__ blenderseed-x.x.x-yyyy.zip blenderseed popd move ..\..\blenderseed-x.x.x-yyyy.zip . pause ``` Exclude README.md file from package
```batchfile @echo off set zipcmd=%~dp0\tools\7z\7z.exe pushd %~dp0\..\.. %zipcmd% a -r -x!scripts -xr!.* -x!__pycache__ -x!README.md blenderseed-x.x.x-yyyy.zip blenderseed popd move ..\..\blenderseed-x.x.x-yyyy.zip . pause ```
c3731373-2d51-4470-bc15-845a228c4ba9
{ "language": "Batchfile" }
```batchfile @pushd %~dp0 ECHO Remember to build the solution first! REM pause "%~dp0\TestHarness\packages\NUnit.Runners.2.6.3\tools\nunit-console.exe" "%~dp0\TestHarness\nunit\bin\Debug\nunitHarness.dll" /result=results-example-nunit.xml /nologo /nodots pause @popd``` Make script independent of NUnit v...
```batchfile @pushd %~dp0 ECHO Remember to build the solution first! REM pause Cd "%~dp0\TestHarness\packages\NUnit.Runners.*\tools" "nunit-console.exe" "%~dp0\TestHarness\nunit\bin\Debug\nunitHarness.dll" /result="%~dp0\results-example-nunit.xml" /nologo /nodots pause @popd```
1bbb3f55-25f6-4de5-ba05-b1865b4d743c
{ "language": "Batchfile" }
```batchfile rem Won't be found because there are no shebang lines on Windows rem python test-script-setup.py rem if errorlevel 1 exit 1 rem python test-script-setup.py | grep "Test script setup\.py" test-script-manual if errorlevel 1 exit 1 test-script-manual | grep "Manual entry point" ``` Add missing "if errorlev...
```batchfile rem Won't be found because there are no shebang lines on Windows rem python test-script-setup.py rem if errorlevel 1 exit 1 rem python test-script-setup.py | grep "Test script setup\.py" rem if errorlevel 1 exit 1 test-script-manual if errorlevel 1 exit 1 test-script-manual | grep "Manual entry point" if...
41d347de-2388-4338-99ed-43c50d90c9e6
{ "language": "Batchfile" }
```batchfile ``` Add batch script to remove a git submodule from a local workspace
```batchfile @rem This is a simple batch script to remove a submodule reference from a @rem working directory @rem Call the script by @rem 1) cd path\to\your\workspace @rem 2) path\to\removeSubmodule.bat submoduleName @rem See https://stackoverflow.com/questions/1260748/how-do-i-remove-a-git-submodule for more detail...
b54e0173-0822-417a-8f2c-476709343be3
{ "language": "Batchfile" }
```batchfile @echo off setlocal set mypath=%~dp0 set PYTHONPATH=pkgs if "%PROCESSOR_ARCHITECTURE%"=="x86" ( set common="%COMMONPROGRAMFILES%" ) else ( set common="%COMMONPROGRAMFILES(x86)%" ) REM Start the DbServer in background but within the same context start "OpenQuake DB server" /B %common%\Pyt...
```batchfile @echo off setlocal set mypath=%~dp0 set PYTHONPATH=pkgs if "%PROCESSOR_ARCHITECTURE%"=="x86" ( set common="%COMMONPROGRAMFILES%" ) else ( set common="%COMMONPROGRAMFILES(x86)%" ) REM Start the DbServer in background but within the same context start "OpenQuake DB server" /B %common%\Pyt...
d9bd621d-e18e-4a38-9732-3103eea120de
{ "language": "Batchfile" }
```batchfile ``` Revert "Now processing a template to produce a valid submit file."
```batchfile universe = vanilla executable = ./x_job_filexfer_testjob.pl log = job_filexfer_input-onegone_van.log output = job_filexfer_input-onegone_van.out error = job_filexfer_input-onegone_van.err input = job_14711_dir/submit_filetrans_input14711.txt transfer_input_files = job_14711_dir/submit_filetrans_input1471...
621b8471-8ea9-4931-8e21-8c41631a77d2
{ "language": "Batchfile" }
```batchfile @echo off set GOARCH=%1 IF "%1" == "" (set GOARCH=amd64) set ORG_PATH=github.com\hashicorp set REPO_PATH=%ORG_PATH%\consul set GOPATH=%cd%\gopath rmdir /s /q %GOPATH%\src\%REPO_PATH% 2>nul mkdir %GOPATH%\src\%ORG_PATH% 2>nul mklink /J "%GOPATH%\src\%REPO_PATH%" "%cd%" 2>nul %GOROOT%\bin\go build -o bin...
```batchfile @echo off REM Download Mingw 64 on Windows from http://win-builds.org/download.html set GOARCH=%1 IF "%1" == "" (set GOARCH=amd64) set ORG_PATH=github.com\hashicorp set REPO_PATH=%ORG_PATH%\consul set GOPATH=%cd%\gopath rmdir /s /q %GOPATH%\src\%REPO_PATH% 2>nul mkdir %GOPATH%\src\%ORG_PATH% 2>nul go g...
7c0648af-0b90-478f-abb0-9285f63aab58
{ "language": "Batchfile" }
```batchfile sed -i 's/gnu/msvc/' changeforest-r/src/Makevars.win sed -i '1s/^/export CXX_STD=CXX11\n/' Makevars.win sed -i '1s/^/export PKG_CXXFLAGS=$(CXX_VISIBILITY)\n/' Makevars.win "%R%" CMD INSTALL --build changeforest-r IF %ERRORLEVEL% NEQ 0 exit 1``` Use the correct path for makevars.
```batchfile sed -i 's/gnu/msvc/' changeforest-r/src/Makevars.win sed -i '1s/^/export CXX_STD=CXX11\n/' changeforest-r/src/Makevars.win sed -i '1s/^/export PKG_CXXFLAGS=$(CXX_VISIBILITY)\n/' changeforest-r/src/Makevars.win "%R%" CMD INSTALL --build changeforest-r IF %ERRORLEVEL% NEQ 0 exit 1```
a586791e-f463-4f58-bb4d-e76784cfd595
{ "language": "Batchfile" }
```batchfile @REM @REM Copyright 2010-2017 Boxfuse GmbH @REM @REM Licensed under the Apache License, Version 2.0 (the "License"); @REM you may not use this file except in compliance with the License. @REM You may obtain a copy of the License at @REM @REM http://www.apache.org/licenses/LICENSE-2.0 @REM @REM Unle...
```batchfile @REM @REM Copyright 2010-2017 Boxfuse GmbH @REM @REM Licensed under the Apache License, Version 2.0 (the "License"); @REM you may not use this file except in compliance with the License. @REM You may obtain a copy of the License at @REM @REM http://www.apache.org/licenses/LICENSE-2.0 @REM @REM Unle...
eb493c92-f484-4575-8289-c63266e4c4da
{ "language": "Batchfile" }
```batchfile ``` Add script to disable intel context menu
```batchfile @echo off setlocal EnableDelayedExpansion set registryRoot=HKCU\Software\Classes set key=igfxcui reg add "%registryRoot%\Directory\Background\shellex\ContextMenuHandlers\%key%" /d "---" /f set key=igfxDTCM reg add "%registryRoot%\Directory\Background\shellex\ContextMenuHandlers\%key%" /d "---" /f ```
a439ed37-25b4-4b89-b6ae-9ec65d824c3b
{ "language": "Batchfile" }
```batchfile ``` Add build script for installation
```batchfile #!/bin/bash PATH=/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin EXEC_DIR="/usr/local/bin" # set to anywhere seen by $PATH CONF_DIR="/etc/distributed-motion-s3" # default location to store config files (*.toml) # build dms3 components # echo 'building dms3 com...
a6564743-238b-40c9-ae60-fe0c4d1a13be
{ "language": "Batchfile" }
```batchfile @echo off if not "%1" == "" goto continue if not exist imaginary\obj mkdir imaginary\obj for %%i in (imaginary\*.yca) do call %0 %%~ni goto end :continue echo Processing %1 main imaginary\%1.yca -mshl -o imaginary\obj\%1 > imaginary\obj\%1.txt 2>&1 goto end :end ``` Change the executab...
```batchfile @echo off if not "%1" == "" goto continue if not exist imaginary\obj mkdir imaginary\obj for %%i in (imaginary\*.yca) do call %0 %%~ni goto end :continue echo Processing %1 firstify imaginary\%1.yca -mshl -o imaginary\obj\%1 > imaginary\obj\%1.txt 2>&1 goto end :end ```
4b882805-7d4e-45e0-84d3-c008ed1461e7
{ "language": "Batchfile" }
```batchfile @echo off pushd %~dp0 dotnet publish tools\Build\Build.csproj --output tools\bin\Build --nologo --verbosity quiet if %errorlevel% equ 0 dotnet tools\bin\Build\Build.dll %* popd ``` Return error level from batch file.
```batchfile @echo off pushd %~dp0 dotnet publish tools\Build\Build.csproj --output tools\bin\Build --nologo --verbosity quiet if %errorlevel% equ 0 dotnet tools\bin\Build\Build.dll %* popd exit /b %errorlevel% ```
1a837f18-9584-4ea0-be2a-6ca540afd167
{ "language": "Batchfile" }
```batchfile @echo off if "%~1"=="" ( call :Usage goto :EOF ) call bootstrap.cmd pushd "%~dp0" setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION set ProgramFilesDir=%ProgramFiles% if NOT "%ProgramFiles(x86)%"=="" set ProgramFilesDir=%ProgramFiles(x86)% set VisualStudioCmd=%ProgramFilesDir%\Microsoft Visual Studi...
```batchfile @echo off if "%~1"=="" ( call :Usage goto :EOF ) call bootstrap.cmd pushd "%~dp0" setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION set ProgramFilesDir=%ProgramFiles% if NOT "%ProgramFiles(x86)%"=="" set ProgramFilesDir=%ProgramFiles(x86)% set VisualStudioCmd=%ProgramFilesDir%\Microsoft Visual Studi...
8ea099ff-a8bf-491a-965a-13efb4693f55
{ "language": "Batchfile" }
```batchfile @echo off cls SET BUILD_DIR=%~dp0\build SET TOOLS_DIR=%BUILD_DIR%\tools SET NUGET_PATH=%TOOLS_DIR%\nuget.exe IF NOT EXIST %TOOLS_DIR%\ ( mkdir %TOOLS_DIR% ) IF NOT EXIST %NUGET_PATH% ( echo Downloading NuGet.exe ... powershell -Command "Invoke-WebRequest https://dist.nuget.org/win-x86-commandline/...
```batchfile @echo off cls SET BUILD_DIR=%~dp0\build SET TOOLS_DIR=%BUILD_DIR%\tools SET NUGET_PATH=%TOOLS_DIR%\nuget.exe IF NOT EXIST %TOOLS_DIR%\ ( mkdir %TOOLS_DIR% ) IF NOT EXIST %NUGET_PATH% ( echo Downloading NuGet.exe ... powershell -Command "Start-BitsTransfer -Source https://dist.nuget.org/win-x86-com...
717f08f6-687e-4434-8528-dcaec3ef2d3b
{ "language": "Batchfile" }
```batchfile @echo off set DIST_DIR=dist set CERTIFICATE_STORE=Root set CERTIFICATE_NAME="Nuxeo Drive SPC" set MSI_PROGRAM_NAME="Nuxeo Drive" set TIMESTAMP_URL=http://timestamp.verisign.com/scripts/timstamp.dll set SIGN_CMD=signtool sign /v /s %CERTIFICATE_STORE% /n %CERTIFICATE_NAME% /d %MSI_PROGRAM_NAME% /t %TIMEST...
```batchfile @echo off set DIST_DIR=dist set CERTIFICATE_PATH=%HOMEPATH%\certificates\nuxeo.com.pfx set MSI_PROGRAM_NAME="Nuxeo Drive" set TIMESTAMP_URL=http://timestamp.verisign.com/scripts/timstamp.dll set SIGN_CMD=signtool sign /v /f %CERTIFICATE_PATH% /d %MSI_PROGRAM_NAME% /t %TIMESTAMP_URL% set VERIFY_CMD=signto...