doc_id
stringlengths
36
36
metadata
dict
input
stringlengths
28
4.3k
output
stringlengths
11
5.45k
8b4b2458-8f29-4f75-a014-9b639a13f942
{ "language": "Ada" }
```ada ``` Refactor Buffered_Stream and Print_Stream - move the TR package instantiation in a separate file
```ada ----------------------------------------------------------------------- -- util-streams-texts-tr -- Text translation utilities on streams -- Copyright (C) 2010, 2011, 2012, 2015, 2016, 2017 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Vers...
503aa1d6-2ace-404a-ab95-f52ab7979019
{ "language": "Ada" }
```ada ``` Implement operations to set the key and IV for AES-128/196/256 encryption and decryption streams
```ada ----------------------------------------------------------------------- -- util-streams-aes -- AES encoding and decoding streams -- Copyright (C) 2019 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may no...
8b9311e8-a7c1-4fd3-9f48-3c4fbc4f05fb
{ "language": "Ada" }
```ada ``` Implement the Print_Field procedure for addresses
```ada ----------------------------------------------------------------------- -- mat-consoles - Console interface -- Copyright (C) 2014 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file excep...
6fceae99-fc7a-4ce9-b862-820d7c86ebf3
{ "language": "Ada" }
```ada ``` Add Split_Header (moved from Ada Server Faces)
```ada ----------------------------------------------------------------------- -- util-http-headers -- HTTP Headers -- Copyright (C) 2022 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file exce...
6e3d3871-5f65-4396-b468-bacd8aad4a6a
{ "language": "Ada" }
```ada ``` Test handling of record fields with negative offsets.
```ada -- RUN: %llvmgcc -c %s with System; procedure Negative_Field_Offset (N : Integer) is type String_Pointer is access String; -- Force use of a thin pointer. for String_Pointer'Size use System.Word_Size; P : String_Pointer; begin P := new String (1 .. N); end; ```
c60c3f71-1c97-490c-83b7-3149fd420c62
{ "language": "Ada" }
```ada ``` Test handling of ARRAY_REF when the component type is of unknown size.
```ada -- RUN: %llvmgcc -c %s -o /dev/null procedure Array_Ref is type A is array (Natural range <>, Natural range <>) of Boolean; type A_Access is access A; function Get (X : A_Access) return Boolean is begin return X (0, 0); end; begin null; end; ```
45f8fdc5-8442-496e-b403-583681e54223
{ "language": "Ada" }
```ada ``` Add simple example for text transformations
```ada ----------------------------------------------------------------------- -- escape -- Text Transformations -- Copyright (C) 2001, 2002, 2003, 2006, 2008, 2009, 2010 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -...
c5735b02-d864-482f-8254-6ee4ed3600a5
{ "language": "Ada" }
```ada ``` Implement the implicit object 'requestScope'
```ada ----------------------------------------------------------------------- -- asf-beans-requests -- Bean giving access to the request object -- Copyright (C) 2017 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- y...
dc572036-e8b9-4bd8-b2ec-0f91235b7fd2
{ "language": "Ada" }
```ada ``` Implement the Insert and Get_Event_Counter operations
```ada ----------------------------------------------------------------------- -- mat-events-targets - Events received and collected from a target -- Copyright (C) 2014 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- ...
56ed527a-360a-4892-bf74-4e22e0091a67
{ "language": "Ada" }
```ada ``` Define a set of interface to send an email and have several possible implementations
```ada ----------------------------------------------------------------------- -- awa-mail-client -- Mail client interface -- Copyright (C) 2012 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this fi...
f8379101-9fb0-4d1a-8adf-2834174d5b90
{ "language": "Ada" }
```ada ``` Add unit test for Parse_Form procedure
```ada ----------------------------------------------------------------------- -- util-properties-form-tests -- Test reading form file into properties -- Copyright (C) 2020 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License");...
f0c64fb2-d9f0-413b-ac96-6c5e0ccbd638
{ "language": "Ada" }
```ada ``` Add unit tests for local store and Read_File/Write_File operations
```ada ----------------------------------------------------------------------- -- babel-stores-local-tests - Unit tests for babel streams -- Copyright (C) 2016 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may ...
8fcb3b72-cc78-4318-8120-5a6c53365c1c
{ "language": "Ada" }
```ada ``` Add blog servlets definition with Image_Servlet type
```ada ----------------------------------------------------------------------- -- awa-blogs-servlets -- Serve files saved in the storage service -- Copyright (C) 2017 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- y...
a6428f80-49bb-4ece-8159-f5a6ce155cc2
{ "language": "Ada" }
```ada ``` Define the factory for the creation of widget components
```ada ----------------------------------------------------------------------- -- widgets-factory -- Factory for widget Components -- Copyright (C) 2013 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use...
95354469-d113-4871-86f3-2825c54771ab
{ "language": "Ada" }
```ada ``` Implement the REST API definition package
```ada ----------------------------------------------------------------------- -- asf-rest-operation -- REST API Operation Definition -- Copyright (C) 2017 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not ...
05eca02f-3c31-47b5-aabe-eb81d52cd0c0
{ "language": "Agda" }
```agda module Base.Change.Context {Type : Set} (ΔType : Type → Type) where -- Transform a context of values into a context of values and -- changes. open import Base.Syntax.Context Type ΔContext : Context → Context ΔContext ∅ = ∅ ΔContext (τ • Γ) = ΔType τ • τ • ΔContext Γ -- like ΔContext, but ΔType τ and...
```agda module Base.Change.Context {Type : Set} (ΔType : Type → Type) where open import Base.Syntax.Context Type -- Transform a context of values into a context of values and -- changes. ΔContext : Context → Context ΔContext ∅ = ∅ ΔContext (τ • Γ) = ΔType τ • τ • ΔContext Γ -- like ΔContext, but ΔType τ and...
7732bace-5493-413b-a380-001ea089cd0f
{ "language": "Agda" }
```agda module meaning where open import Level record Meaning (Syntax : Set) {ℓ : Level} : Set (suc ℓ) where constructor meaning field {Semantics} : Set ℓ ⟦_⟧ : Syntax → Semantics open Meaning {{...}} public ``` Improve printing of resolved overloading.
```agda module meaning where open import Level record Meaning (Syntax : Set) {ℓ : Level} : Set (suc ℓ) where constructor meaning field {Semantics} : Set ℓ ⟨_⟩⟦_⟧ : Syntax → Semantics open Meaning {{...}} public renaming (⟨_⟩⟦_⟧ to ⟦_⟧) open Meaning public using (⟨_⟩⟦_⟧) ```
083fa2cc-e5fd-4250-8d6c-e742e1632584
{ "language": "Agda" }
```agda {-# OPTIONS --without-K #-} open import Type hiding (★) module Data.Tree.Binary where data BinTree {a} (A : ★ a) : ★ a where empty : BinTree A leaf : A → BinTree A fork : (ℓ r : BinTree A) → BinTree A ``` Add Any predicate for binary tree
```agda {-# OPTIONS --without-K #-} open import Type hiding (★) open import Level open import Data.Zero open import Data.Sum module Data.Tree.Binary where data BinTree {a} (A : ★ a) : ★ a where empty : BinTree A leaf : A → BinTree A fork : (ℓ r : BinTree A) → BinTree A Any : ∀ {a p}{A : ★ a}(P : A → ★ p) → ...
9381bc78-a5a3-4bea-ab70-29570a580d0f
{ "language": "Agda" }
```agda ``` Add alternative defintion for IND CPA
```agda {-# OPTIONS --without-K #-} open import Type open import Data.Product open import Data.Bit module Game.IND-CPA-alt (PubKey : ★) (SecKey : ★) (Message : ★) (CipherText : ★) -- randomness supply for: encryption, key-generation, adversary, extensions (Rₑ Rₖ Rₐ : ★) (KeyGen : Rₖ → PubKe...
6ccc942c-a998-499c-b1bb-761b979f074f
{ "language": "Agda" }
```agda ``` Add incomplete note on co-inductive natural numbers.
```agda ------------------------------------------------------------------------------ -- Definition of FOTC Conat using Agda's co-inductive combinators ------------------------------------------------------------------------------ {-# OPTIONS --allow-unsolved-metas #-} {-# OPTIONS --no-universe-polymorphism #-} {-# O...
6b265d43-a8db-4440-ba7d-f6b16e331811
{ "language": "Agda" }
```agda module Base.Change.Context {Type : Set} (ΔType : Type → Type) where -- Transform a context of values into a context of values and -- changes. open import Base.Syntax.Context Type ΔContext : Context → Context ΔContext ∅ = ∅ ΔContext (τ • Γ) = ΔType τ • τ • ΔContext Γ -- like ΔContext, but ΔType τ and...
```agda module Base.Change.Context {Type : Set} (ΔType : Type → Type) where open import Base.Syntax.Context Type -- Transform a context of values into a context of values and -- changes. ΔContext : Context → Context ΔContext ∅ = ∅ ΔContext (τ • Γ) = ΔType τ • τ • ΔContext Γ -- like ΔContext, but ΔType τ and...
ae2ec0cd-6b02-420f-8583-c52d7df0d3b8
{ "language": "Agda" }
```agda module meaning where open import Level record Meaning (Syntax : Set) {ℓ : Level} : Set (suc ℓ) where constructor meaning field {Semantics} : Set ℓ ⟦_⟧ : Syntax → Semantics open Meaning {{...}} public ``` Improve printing of resolved overloading.
```agda module meaning where open import Level record Meaning (Syntax : Set) {ℓ : Level} : Set (suc ℓ) where constructor meaning field {Semantics} : Set ℓ ⟨_⟩⟦_⟧ : Syntax → Semantics open Meaning {{...}} public renaming (⟨_⟩⟦_⟧ to ⟦_⟧) open Meaning public using (⟨_⟩⟦_⟧) ```
e4d650c4-ec92-4c2e-88e8-bc57750fb927
{ "language": "Agda" }
```agda {-# OPTIONS --without-K #-} open import Type hiding (★) module Data.Tree.Binary where data BinTree {a} (A : ★ a) : ★ a where empty : BinTree A leaf : A → BinTree A fork : (ℓ r : BinTree A) → BinTree A ``` Add Any predicate for binary tree
```agda {-# OPTIONS --without-K #-} open import Type hiding (★) open import Level open import Data.Zero open import Data.Sum module Data.Tree.Binary where data BinTree {a} (A : ★ a) : ★ a where empty : BinTree A leaf : A → BinTree A fork : (ℓ r : BinTree A) → BinTree A Any : ∀ {a p}{A : ★ a}(P : A → ★ p) → ...
e7769b51-5846-46e0-8fbe-68c683e89b47
{ "language": "Agda" }
```agda ``` Add alternative defintion for IND CPA
```agda {-# OPTIONS --without-K #-} open import Type open import Data.Product open import Data.Bit module Game.IND-CPA-alt (PubKey : ★) (SecKey : ★) (Message : ★) (CipherText : ★) -- randomness supply for: encryption, key-generation, adversary, extensions (Rₑ Rₖ Rₐ : ★) (KeyGen : Rₖ → PubKe...
9d32766a-de27-41c5-9c21-35f7d50c115d
{ "language": "Agda" }
```agda ``` Add incomplete note on co-inductive natural numbers.
```agda ------------------------------------------------------------------------------ -- Definition of FOTC Conat using Agda's co-inductive combinators ------------------------------------------------------------------------------ {-# OPTIONS --allow-unsolved-metas #-} {-# OPTIONS --no-universe-polymorphism #-} {-# O...
d39bb1c7-45cf-4867-ba4a-bc75f147422a
{ "language": "ANTLR" }
```antlr grammar WorkflowCatalogQueryLanguage; @header { package org.ow2.proactive.workflow_catalog.rest.query; } clause: ATTRIBUTE OPERATOR VALUE ; clauses: clause ( CONJUNCTION clause )* ; statement: '(' clauses ')' | clauses ; ATTRIBUTE: ([a-z] | [A-Z])+ ([_.]+ ([a-z] | [A-Z] | [0-9])*)* ; CONJUNCTION: 'AND' |...
```antlr grammar WorkflowCatalogQueryLanguage; @header { package org.ow2.proactive.workflow_catalog.rest.query; } // PARSER expression : and_expression ; and_expression : or_expression (AND or_expression)* ; or_expression : clause (OR clause)* ; clause : (AttributeLiteral COMPARE_OP...
100a4c5c-daf3-4e9d-9c8e-228ba7872a10
{ "language": "ANTLR" }
```antlr grammar InvestmentSize; import Tokens; @header { import com.github.robozonky.strategy.natural.*; } investmentSizeExpression returns [Collection<InvestmentSize> result]: { Collection<InvestmentSize> result = new LinkedHashSet<>(); } (i=investmentSizeRatingExpression { result.add($i.result); })+ { $res...
```antlr grammar InvestmentSize; import Tokens; @header { import com.github.robozonky.strategy.natural.*; } investmentSizeExpression returns [Collection<InvestmentSize> result]: { Collection<InvestmentSize> result = new LinkedHashSet<>(); } (i=investmentSizeRatingExpression { result.add($i.result); })* { $res...
cefb098a-0abf-4be8-ad9f-090b69ddb3c9
{ "language": "ANTLR" }
```antlr grammar Relational; relationalExpression : unionExpression ; unionExpression : 'union' '(' datasetExpression (',' datasetExpression )* ')' ; datasetExpression : 'datasetExpr' NUM+; NUM : '0'..'9' ; WS : [ \t\n\t] -> skip ; ``` Add joinExpression to the relationalExpression
```antlr grammar Relational; relationalExpression : unionExpression | joinExpression ; unionExpression : 'union' '(' datasetExpression (',' datasetExpression )* ')' ; datasetExpression : 'datasetExpr' NUM+; joinExpression : '[' (INNER | OUTER | CROSS ) datasetExpression (',' datasetExpression )* ']' joinClause (','...
afa37190-583c-4861-a781-5b9adf9a08ba
{ "language": "ANTLR" }
```antlr grammar Type; CT : [A-Z][a-z]+ ; VT : [a-z]+ ; WS : [ \t\r\n]+ -> skip ; type : functionType | compoundType; // function type functionType : compoundType ('->' type)+ ; compoundType : concreteType | tupleType | listType | parenType ; tupleType : '(' type (',' type)+ ')' ; // tuple type, k>=2 listType : '[' ...
```antlr grammar Type; CT : [A-Z][a-z]+ ; VT : [a-z]+ ; WS : [ \t\r\n]+ -> skip ; type : functionType | compoundType ; // function type functionType : compoundType '->' type ; compoundType : constantType | variableType | tupleType | listType | parenType ; tupleType : '(' type (',' type)+ ')' ; // tuple type, k>=2 li...
0cfb16bb-4c47-4188-a3f2-8942d3092583
{ "language": "ANTLR" }
```antlr grammar Expression; expression : sign = ('-' | '+') expression | subExpresion | left = expression op = POW right = expression | left = expression op = ( MULT | DIV ) right = expression | left = expression op = ( ADD | SUB ) right = expression | function | value = ( IDENT | CONST ) ; sub...
```antlr grammar Expression; expression : sign = ('-' | '+') expression | subExpresion | left = expression op = POW right = expression | left = expression op = ( MULT | DIV ) right = expression | left = expression op = ( ADD | SUB ) right = expression | function | value = ( IDENT | CONST ) ; sub...
b5f1122c-d417-4949-b0a0-4e311eed0590
{ "language": "ANTLR" }
```antlr /*- * #%L * Java VTL * %% * Copyright (C) 2016 Hadrien Kohl * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * U...
```antlr /*- * #%L * Java VTL * %% * Copyright (C) 2016 Hadrien Kohl * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * U...
bfebdb41-281c-484a-9e3a-186e5d871e93
{ "language": "ANTLR" }
```antlr grammar Type; CT : [A-Z][a-z]+ ; VT : [a-z]+ ; WS : [ \t\r\n]+ -> skip ; type : typeClasses ? innerType ; innerType : functionType | compoundType ; // function type functionType : compoundType '->' innerType ; compoundType : constantType | variableType | tupleType | listType | parenType ; tupleType : '(' in...
```antlr grammar Type; CT : [A-Z][A-Za-z]+ ; VT : [a-z]+ ; WS : [ \t\r\n]+ -> skip ; type : (typeClasses '=>')? innerType ; innerType : functionType | compoundType ; // function type functionType : compoundType '->' innerType ; compoundType : constantType | variableType | tupleType | listType | parenType ; tupleType...
89cc60c3-a24c-4447-8635-56962ac636d5
{ "language": "ANTLR" }
```antlr grammar WorkflowCatalogQueryLanguage; @header { package org.ow2.proactive.workflow_catalog.rest.query.parser; } // PARSER expression : and_expression ; and_expression : or_expression (AND or_expression)* ; or_expression : clause (OR clause)* ; clause : (AttributeLiteral COM...
```antlr grammar WorkflowCatalogQueryLanguage; @header { package org.ow2.proactive.workflow_catalog.rest.query.parser; } // PARSER expression : and_expression ; and_expression : or_expression (AND or_expression)* ; or_expression : clause (OR clause)* ; clause : (AttributeLiteral COM...
2daed35a-c019-4576-84b3-a2d6b39f6873
{ "language": "ANTLR" }
```antlr lexer grammar CcsLexer; TERM: ';'; NIL: '0'; COMMA: ','; DIV : '/' ; DEF: '='; PAR: '|'; PREFIX: '.'; CHOICE: '+'; TAU: 'tau'; LBRACE : '{' ; RBRACE : '}' ; MUL : '*' ; SETDEF : 'set ' ; LPAREN : '(' ; RPAREN : ')' ; LBRACK : '[' ; RBRACK : ']' ; T__1 : '\\' ; COACTION: '\''[a-z][A-Za-z0-9]*; ACTION: [a-z...
```antlr lexer grammar CcsLexer; TERM: ';'; NIL: '0'; COMMA: ','; DIV : '/' ; DEF: '='; PAR: '|'; PREFIX: '.'; CHOICE: '+'; TAU: 'tau'; LBRACE : '{' ; RBRACE : '}' ; MUL : '*' ; SETDEF : 'set ' ; LPAREN : '(' ; RPAREN : ')' ; LBRACK : '[' ; RBRACK : ']' ; T__1 : '\\' ; COACTION: '\''[a-z][A-Za-z0-9]*; ACTION: [a-z...
8ebb4c73-42df-4cb0-a62c-7142979482e1
{ "language": "ANTLR" }
```antlr grammar Type; CT : [A-Z][a-z]+ ; VT : [a-z]+ ; WS : [ \t\r\n]+ -> skip ; baseType : typeClasses ? type ; type : functionType | compoundType ; // function type functionType : compoundType '->' type ; compoundType : constantType | variableType | tupleType | listType | parenType ; tupleType : '(' type (',' typ...
```antlr grammar Type; CT : [A-Z][a-z]+ ; VT : [a-z]+ ; WS : [ \t\r\n]+ -> skip ; type : typeClasses ? innerType ; innerType : functionType | compoundType ; // function type functionType : compoundType '->' innerType ; compoundType : constantType | variableType | tupleType | listType | parenType ; tupleType : '(' in...
e525eaa2-2cde-4847-9b33-7164a8881a4b
{ "language": "ANTLR" }
```antlr grammar PTP; @header { package pt.up.fe.iart.proj1.parser; } map : stmt+ ; stmt : node_stmt #node | edge_stmt #edge ; edge_stmt : 'Edge' '(' from=node_stmt ',' to=node_stmt ',' weight=(INT|REAL) ')'; node_stmt : 'GasStation' '(' position ')' #GasStation | 'GenericLo...
```antlr grammar PTP; @header { package pt.up.fe.iart.proj1.parser; } map : stmt+ ; stmt : node_stmt #node | edge_stmt #edge ; edge_stmt : 'Edge' '(' from=node_stmt ',' to=node_stmt ',' weight=(INT|REAL) ')'; node_stmt : 'GasStation' '(' position ')' #GasStation | 'GenericLo...
735241e6-dd86-43fc-9bb8-3d081386090e
{ "language": "ANTLR" }
```antlr grammar Type; CT : [A-Z][a-z]+ ; VT : [a-z]+ ; WS : [ \t\r\n]+ -> skip ; type : typeClasses ? innerType ; innerType : functionType | compoundType ; // function type functionType : compoundType '->' innerType ; compoundType : constantType | variableType | tupleType | listType | parenType ; tupleType : '(' in...
```antlr grammar Type; CT : [A-Z][a-z]+ ; VT : [a-z]+ ; WS : [ \t\r\n]+ -> skip ; type : typeClasses ? innerType ; innerType : functionType | compoundType ; // function type functionType : compoundType '->' innerType ; compoundType : constantType | variableType | tupleType | listType | parenType ; tupleType : '(' in...
e3a2cae9-5bb3-40e9-8602-c8c09c389f93
{ "language": "ANTLR" }
```antlr ``` Add first attempt at track grammar
```antlr grammar Track; track: track_decl decl* ; track_decl: 'track' '{' IDENT+ '}' ; decl: block_decl | channel_decl ; block_decl: IDENT '::' 'block' '{' block_body '}' ; block_body: (note)+ ; note: NOTENAME OCTAVE? LENGTH? ; channel_decl: IDENT '::' 'channel' WAVE '{' channel_body '}' ; channel_body: (block_nam...
b5d1082f-01b9-4884-a6a8-dfb611e414d8
{ "language": "ANTLR" }
```antlr ``` Create prolog/scala based ANTLR 4 grammar to use to parse input files.
```antlr grammar PTP; @header { package pt.up.fe.iart.proj1.parser; } map : stmt+ ; stmt : node_stmt #node | edge_stmt #edge ; edge_stmt : 'Edge' '(' from=node_stmt ',' to=node_stmt ',' weight=(INT|REAL) ')'; node_stmt : 'GasStation' '(' position ')' #GasStation | 'GenericLo...
1d31128f-c589-4ef2-bf44-ea4c10d25a77
{ "language": "ANTLR" }
```antlr ``` Add grammar in ANTLR 4 format
```antlr grammar Viper; tokens { NAME , NEWLINE , INDENT , DEDENT , NUMBER , STRING } func_def: 'def' func_name parameters '->' func_type ':' suite ; func_name: NAME ; func_type: type_expr ; parameters: '(' params_list? ')' ; params_list: argless_parameter parameter* ; param...
177c6d70-5877-4c03-99c9-2d3402ee3792
{ "language": "ApacheConf" }
```apacheconf server { server_name default; root /var/www/public; index main.php; client_max_body_size 100M; fastcgi_read_timeout 1800; location / { try_files $uri $uri/ /index.php$is_args$args; } location /status { access_log off; allow 172.17.0.0/16; deny all; i...
```apacheconf server { server_name default; root /var/www/public; index main.php; client_max_body_size 100M; fastcgi_read_timeout 1800; location / { try_files $uri $uri.html $uri/ @extensionless-php; } location @extensionless-php { rewrite ^(.*)$ $1.php last; } location /sta...
ee59be54-8e9b-4a5a-81d5-4925fa021744
{ "language": "ApacheConf" }
```apacheconf WSGIPythonPath /path/to/repo/FuzzManager/server <VirtualHost *:80> ServerName fuzzmanager.your.domain Alias /static/ /path/to/repo/FuzzManager/server/crashmanager/static/ Alias /tests/ /path/to/repo/FuzzManager/server/tests/ WSGIScriptAlias / /path/to/repo/FuzzManager/server/server/wsgi.py WSGIPass...
```apacheconf WSGIDaemonProcess fuzzmanager.your.domain python-path=/path/to/repo/FuzzManager/server WSGIProcessGroup fuzzmanager.your.domain WSGIApplicationGroup %{GLOBAL} <VirtualHost *:80> ServerName fuzzmanager.your.domain Alias /static/ /path/to/repo/FuzzManager/server/crashmanager/static/ Alias /tests/ /path...
7c5580fa-0b56-4324-94e7-8946d91618e8
{ "language": "API Blueprint" }
```apiblueprint FORMAT: 1A HOST: https://neighbor.ly/api/ # Neighbor.ly Here you will find how to integrate an application with Neighbor.ly. Check our [Dashboard source code](https://github.com/neighborly/neighborly-dashboard) for a real use case. # Sessions Your first stop when integrating with Neighborly. For a lot...
```apiblueprint FORMAT: 1A HOST: https://neighbor.ly/api/ # Neighbor.ly Here you will find how to integrate an application with Neighbor.ly. Check our [Dashboard source code](https://github.com/neighborly/neighborly-dashboard) for a real use case. # Sessions Your first stop when integrating with Neighborly. For a lot...
c161883e-46a7-45df-b15c-b3ed82e08e3c
{ "language": "API Blueprint" }
```apiblueprint # Lion API Lion is a basic localization service using `git` as the backend for storing translations. ## Request headers All requests to Lion must include the following headers: - `Lion-Api-Version` # Group Projects ## Project collection [/projects] ### List projects [GET] List all configured pro...
```apiblueprint # Lion API Lion is a basic localization service using `git` as the backend for storing translations. ## Request headers Requests should have the `Lion-Api-Version` header set. The current API version is `v1`. If the header is not set, it is assumed to be the latest version. Example header: - `Lion-...
a61d3f4d-6366-4c73-b0d7-940d25d30f21
{ "language": "API Blueprint" }
```apiblueprint FORMAT: 1A HOST: https://www.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/articles/{id}] A single Article object with all its details + Parameters + id (required, string, `foo...
```apiblueprint FORMAT: 1A HOST: https://www.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/articles/{id}] A single Article object with all its details + Parameters + id (required, string, `foo...
c39ef5a3-dc97-4545-ad68-8861d00d4117
{ "language": "API Blueprint" }
```apiblueprint FORMAT: 1A HOST: https://orgmanager.miguelpiedrafita.com/api # Orgmanager API The Orgmanager API allows you to integrate Orgmanager with other applications and projects. ## Questions Collection [/questions] ### List All Questions [GET] + Response 200 (application/json) [ { ...
```apiblueprint FORMAT: 1A HOST: https://orgmanager.miguelpiedrafita.com/api # Orgmanager API The Orgmanager API allows you to integrate Orgmanager with other applications and projects. ## User Data [/user] ### Get user info [GET] + Response 200 (application/json) { "id":1, "name":...
3c30770f-f075-4c2e-acec-7321d67956da
{ "language": "API Blueprint" }
```apiblueprint FORMAT: 1A HOST: https://www.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/articles/{id}] A single Article object with all its details + Parameters + id (required, string, `foo...
```apiblueprint FORMAT: 1A HOST: https://www.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/{locale}/articles/{id}] A single Article object with all its details + Parameters + locale = `en` (op...
0448eb27-e039-4dbd-ad69-95b3f6411339
{ "language": "API Blueprint" }
```apiblueprint FORMAT: 1A HOST: https://api.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/articles/{id}] A single Article object with all its details + Parameters + id (required, string, `foo...
```apiblueprint FORMAT: 1A HOST: https://www.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/articles/{id}] A single Article object with all its details + Parameters + id (required, string, `foo...
75f3b46d-73e9-46f2-a61c-86670e91d694
{ "language": "API Blueprint" }
```apiblueprint FORMAT: 1A HOST: https://www.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/{locale}/articles/{id}] A single Article object with all its details + Parameters + locale = `en` (op...
```apiblueprint FORMAT: 1A HOST: https://www.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/{locale}/articles/{id}] A single Article object with all its details + Parameters + locale = `en` (op...
5878ebe1-9efa-4114-bb5e-484dd228d679
{ "language": "API Blueprint" }
```apiblueprint FORMAT: 1A HOST: https://api.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service's API. # Group Articles Article related resources of the **Money Advice Service** ## Articles Collection [/articles] ### List all Articles [GET] + Response 200 (application/json) [{...
```apiblueprint FORMAT: 1A HOST: https://api.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/articles/{id}] A single Article object with all its details + Parameters + id (required, string, `foo...
9c057a54-83f0-481f-bea0-67e5bdbd2b00
{ "language": "API Blueprint" }
```apiblueprint FORMAT: 1A HOST: https://www.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/articles/{id}] A single Article object with all its details + Parameters + id (required, string, `foo...
```apiblueprint FORMAT: 1A HOST: https://www.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/{locale}/articles/{id}] A single Article object with all its details + Parameters + locale = `en` (op...
7a3e0062-7745-4261-8f2c-0389d15e170a
{ "language": "API Blueprint" }
```apiblueprint FORMAT: 1A HOST: https://api.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/articles/{id}] A single Article object with all its details + Parameters + id (required, string, `foo...
```apiblueprint FORMAT: 1A HOST: https://api.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/articles/{id}] A single Article object with all its details + Parameters + id (required, string, `foo...
fd6bfff2-b5ec-4a0c-a3c4-a9d19eaadc5c
{ "language": "API Blueprint" }
```apiblueprint FORMAT: 1A HOST: https://www.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/articles/{id}] A single Article object with all its details + Parameters + id (required, string, `foo...
```apiblueprint FORMAT: 1A HOST: https://www.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/articles/{id}] A single Article object with all its details + Parameters + id (required, string, `foo...
e282a9fb-f61b-441a-a26c-d30bab76724d
{ "language": "API Blueprint" }
```apiblueprint # Lion API Lion is a basic localization service using `git` as the backend for storing translations. ## Request headers Requests should have the `Lion-Api-Version` header set. The current API version is `v1`. If the header is not set, it is assumed to be the latest version. Example header: - `Lion-...
```apiblueprint # Lion API Lion is a basic localization service using `git` as the backend for storing translations. ## Request headers Requests should have the `Lion-Api-Version` header set. The current API version is `v1`. If the header is not set, it is assumed to be the latest version. Example header: - `Lion-...
909bdae0-ae6f-4da4-a045-29beead3590d
{ "language": "API Blueprint" }
```apiblueprint FORMAT: 1A HOST: https://api.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/articles/{id}] A single Article object with all its details + Parameters + id (required, string, `foo...
```apiblueprint FORMAT: 1A HOST: https://api.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/articles/{id}] A single Article object with all its details + Parameters + id (required, string, `foo...
e13c4a44-ea7f-4606-95ff-156432c02d96
{ "language": "API Blueprint" }
```apiblueprint FORMAT: 1A HOST: https://awesome-bucketlist-api.herokuapp.com/ # awesome-bucketlist Polls is a simple API allowing consumers to view polls and vote in them. ## Bucketlists [/bucketlists] ### Create New Bucketlist [POST] Creates a new bucketlist under your account. + Request (application/json) ...
```apiblueprint FORMAT: 1A HOST: https://awesome-bucketlist-api.herokuapp.com/ # awesome-bucketlist A Bucketlist is a list of items, activities or goals you want to achieve before you "kick the bucket" this is an API to allow you create a new user account, login into your account, create, update, view or delete buck...
582d9221-dd75-44dd-a827-bb49d951f810
{ "language": "API Blueprint" }
```apiblueprint <!-- include(models.apib) --> # Group Rescues <!-- include(rescues/list.apib) --> <!-- include(rescues/create.apib) --> <!-- include(rescues/retrieve.apib) --> <!-- include(rescues/update.apib) --> ``` Add missing rescue search documentation
```apiblueprint # Group Rescues <!-- include(rescues/list.apib) --> <!-- include(rescues/create.apib) --> <!-- include(rescues/retrieve.apib) --> <!-- include(rescues/search.apib) --> <!-- include(rescues/update.apib) --> ```
20a7caa5-cea6-41f3-9198-5955a1c3bbe0
{ "language": "API Blueprint" }
```apiblueprint FORMAT: 1A HOST: https://www.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/{locale}/articles/{id}] A single Article object with all its details + Parameters + locale = `en` (op...
```apiblueprint FORMAT: 1A HOST: https://www.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/{locale}/articles/{id}] A single Article object with all its details + Parameters + locale = `en` (op...
072111ee-dc19-4ede-a3ad-d95357c5dd8f
{ "language": "API Blueprint" }
```apiblueprint FORMAT: 1A HOST: https://api.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/articles/{id}] A single Article object with all its details + Parameters + id (required, string, `foo...
```apiblueprint FORMAT: 1A HOST: https://api.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/articles/{id}] A single Article object with all its details + Parameters + id (required, string, `foo...
b5318140-9819-47d6-8787-dd36c14f8a18
{ "language": "API Blueprint" }
```apiblueprint FORMAT: 1A HOST: https://api.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/articles/{id}] A single Article object with all its details + Parameters + id (required, string, `foo...
```apiblueprint FORMAT: 1A HOST: https://api.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/articles/{id}] A single Article object with all its details + Parameters + id (required, string, `foo...
2bb1ebe2-c0da-4951-88f4-1dbc78c4503e
{ "language": "API Blueprint" }
```apiblueprint FORMAT: 1A HOST: https://api.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/articles/{id}] A single Article object with all its details + Parameters + id (required, string, `foo...
```apiblueprint FORMAT: 1A HOST: https://www.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/articles/{id}] A single Article object with all its details + Parameters + id (required, string, `foo...
bde2fdaa-1f8a-4e00-bfbc-4d418c075dc5
{ "language": "API Blueprint" }
```apiblueprint FORMAT: 1A # Machines API # Group Machines # Machines collection [/machines/{id}] + Parameters - id (number, `1`) ## Get Machines [GET] - Request (application/json) + Parameters - id (number, `2`) - Response 200 (application/json; charset=utf-8) [ { "type": "bulldoze...
```apiblueprint FORMAT: 1A # Machines API # Group Machines # Machines collection [/machines/{id}] + Parameters + id (number, `1`) ## Get Machines [GET] + Request (application/json) + Parameters + id (number, `2`) + Response 200 (application/json; charset=utf-8) [ { ...
f0bda386-ff89-4f6b-a7e3-214fba6a59cf
{ "language": "API Blueprint" }
```apiblueprint FORMAT: 1A # Organising, Swiftly _Organising_ is an outliner/todo list with strong search functionality. ## Node Collection [/nodes] ### Root node and all children [GET] Returns the root node, with all of its children. + Response 200 (application/json) { "ID": 0, "text": "Update...
```apiblueprint FORMAT: 1A # Organising, Swiftly _Organising_ is an outliner/todo list with strong search functionality. ## Node Collection [/nodes] ### Root node and all children [GET] Returns the root node, with all of its children. + Response 200 (application/json) { "ID": 0, "te...
e37c57b4-5cbd-4cd4-9b13-c00dfc80d122
{ "language": "API Blueprint" }
```apiblueprint ``` Add Apiary Documentation for the API
```apiblueprint FORMAT: 1A HOST: https://awesome-bucketlist-api.herokuapp.com/ # awesome-bucketlist Polls is a simple API allowing consumers to view polls and vote in them. ## Bucketlists [/bucketlists] ### Create New Bucketlist [POST] Creates a new bucketlist under your account. + Request (application/json) ...
25b17d1f-2bf3-468f-a8b4-5287f49c0ad3
{ "language": "API Blueprint" }
```apiblueprint ``` Add login and registration to blueprint
```apiblueprint FORMAT: 1A # Admiral Admiral is a deployment management system for Fleet and CoreOS. Unlike other deployment systems, Admiral also allows for automatic deployment and scaling of Fleet units. # Admiral Root [/v1] This resource simply represents the root of the Admiral API. It provides a basic JSON re...
2982949c-26f6-4d8b-be34-fad9cb838380
{ "language": "APL" }
```apl  msg←SelectAdvanced;result;output;sel;froot;prev ⍝ Test /Examples/DC/SelectAdvanced ⍝ Ensure 'multi' (the selection list) is there: msg←'selection list not there' :If 0≢sel←Find'multi' ⍝ Grab the 2 elements already chosen: Click'PressMe' output←Find'output' {0≠⍴output.Text}Retry ⍬ ⍝ Wait to...
```apl  msg←SelectAdvanced;result;output;sel;froot;prev ⍝ Test /Examples/DC/SelectAdvanced ⍝ Ensure 'multi' (the selection list) is there: msg←'selection list not there' :If 0≢sel←Find'multi' ⍝ Grab the 2 elements already chosen: Click'PressMe' output←Find'output' {0≠⍴output.Text}Retry ⍬ ⍝ Wait to...
4727b64b-c088-4819-80c6-5249f9ef0941
{ "language": "APL" }
```apl :Class EditFieldSimple : MiPageSample ⍝ Control:: _DC.EditField _DC.Button _html.label ⍝ Description:: Collect input and echo it on a button press ∇ Compose;btn;F1;label;name :Access Public F1←'myform'Add _.Form ⍝ Create a form label←('for"name"')F1.Add _.label'Please enter your nam...
```apl :Class EditFieldSimple : MiPageSample ⍝ Control:: _DC.EditField _DC.Button _html.label ⍝ Description:: Collect input and echo it on a button press ∇ Compose;btn;F1;label;name :Access Public F1←'myform'Add _.Form ⍝ Create a form label←('for="name"')F1.Add _.label'Please enter your na...
7cd2e625-0b30-4ca8-bd7b-8b3d70d3d365
{ "language": "APL" }
```apl :Class MS3Server : MiServer ⍝ This is an example of a customized MiServer ⍝ The MiServer class exposes several overridable methods that can be customized by the user ⍝ In this case we customize the onServerLoad method ⍝ The ClassName parameter in the Server.xml configuration file is used to specify the customiz...
```apl :Class MS3Server : MiServer ⍝ This is an example of a customized MiServer ⍝ The MiServer class exposes several overridable methods that can be customized by the user ⍝ In this case we customize the onServerLoad method ⍝ The ClassName parameter in the Server.xml configuration file is used to specify the customiz...
5340748d-96d3-4f25-a17f-0314ad8a9e64
{ "language": "APL" }
```apl :class aSimple : MiPageSample ⍝ Control:: _html.a ⍝ Description:: Insert a hyperlink ∇ Compose :Access public Add 'Click ' 'href' 'http://www.dyalog.com/meet-team-dyalog.htm'Add _.a'here' Add ' to meet us.' ∇ :endclass ``` Fix to new ParseAttr syntax
```apl :class aSimple : MiPageSample ⍝ Control:: _html.a ⍝ Description:: Insert a hyperlink ∇ Compose :Access public Add'Click ' 'href=http://www.dyalog.com/meet-team-dyalog.htm'Add _.a'here' Add' to meet us.' ∇ :endclass ```
f25d0f72-adc5-4d90-9ae7-abb84825cdc1
{ "language": "APL" }
```apl #!/usr/local/bin/apl -s 'Day 3: Perfectly Spherical Houses in a Vacuum' i ← (0 0) cmds ← ('<' '>' '^' 'v') dirs ← ((¯1 0) (1 0) (0 ¯1) (0 1)) houses ← ∪ (0 0) , i { ++\⍵ } { dirs[ti] ⊣ ti ← cmds ⍳ ⍵ } ⍞ ⍴ houses ⍝ the amount of houses to visit )OFF ``` Trim fat on apl nr 1
```apl #!/usr/local/bin/apl -s 'Day 3: Perfectly Spherical Houses in a Vacuum' cmds ← ('<' '>' '^' 'v') dirs ← ((¯1 0) (1 0) (0 ¯1) (0 1)) houses ← ∪ (0 0) , { ++\⍵ } { dirs[ti] ⊣ ti ← cmds ⍳ ⍵ } ⍞ ⍴ houses ⍝ the amount of houses to visit )OFF ```
86100620-f9b0-4c90-9f27-2c017b3b2d38
{ "language": "APL" }
```apl :class abbrsample: MiPage ⍝ Control:: HTML.abbr ⍝ Description:: this is an example of use of abbr which allows you to display text when hovering over an area ⍝ ⍝ This is an example of using the HTML 'abbr' element. ∇ Compose :Access public ⍝ We simply display the text 'Hover over THIS to re...
```apl :class abbrsample: MiPage ⍝ Control:: HTML.abbr ⍝ Description:: this is an example of use of abbr which allows you to display text when hovering over an area ⍝ This is an example of using the HTML 'abbr' element. ∇ Compose :Access public ⍝ We simply display the text 'Hover over THIS to reveal....
90b419ec-4bec-46b4-8ca6-55c98167df1f
{ "language": "APL" }
```apl ``` Add boilerplate APL script to serve CGI webpages
```apl #!/usr/local/bin/apl --script NEWLINE ← ⎕UCS 10 HEADERS ← 'Content-Type: text/plain', NEWLINE HEADERS ⍝ ⎕←HEADERS ⍝ ⍕⎕TS )OFF ⍝ testVars←'FUCKYEAH' ⍝ ≠\~(testVars ∊ 'AEIOU') ⍝ (124 × 4)≠(+/124 124 124) ⍝ testVars ∊ '<>' ```
ecea2d5d-e815-4621-938e-72ff99c1ce42
{ "language": "AppleScript" }
```applescript on run argv tell application "iTunes" set p to first item of argv set a to (p as POSIX file) add a to playlist (second item of argv) end tell end run ``` Add explanation of arguments in AppleScript scripts
```applescript on run argv set posixFile to first item of argv set playlistName to second item of argv tell application "iTunes" set p to posixFile set a to (p as POSIX file) add a to playlist playlistName end tell end run ```
bab87279-6eaf-4be8-94f0-8021c71022a9
{ "language": "AppleScript" }
```applescript -- execute_iterm.scpt -- last change: 19 Jan 2013 --- -- this script require an argument that represent the command to execute on run argv set command to (item 1 of argv) tell application "iTerm" try set mysession to current session of current terminal on error...
```applescript -- execute_iterm.scpt -- last change: 19 Jan 2013 --- -- this script require an argument that represent the command to execute on run argv set command to (item 1 of argv) tell application "iTerm" try set mysession to current session of current terminal on error ...
49b05acc-ec19-4cde-b5f5-505955d212f4
{ "language": "AppleScript" }
```applescript tell application "Spotify" set cstate to "{" set cstate to cstate & "\"track_id\": \"" & current track's id & "\"" set cstate to cstate & ",\"volume\": " & sound volume set cstate to cstate & ",\"position\": " & player position set cstate to cstate & ",\"state\": \"" & player state & "\"" set...
```applescript on replace_chars(this_text, search_string, replacement_string) set AppleScript's text item delimiters to the search_string set the item_list to every text item of this_text set AppleScript's text item delimiters to the replacement_string set this_text to the item_list as string set AppleScript'...
40cdd29e-d0c8-4740-bc7d-c059f334f116
{ "language": "AppleScript" }
```applescript on run tell application "BibDesk" try set alertResult to display alert ("Really remove all linked files and private notes from " & name of first document as string) & "?" buttons {"Cancel", "OK"} default button "OK" cancel button "Cancel" as warning if button returned of alertResult is "OK" ...
```applescript on run tell application "BibDesk" try set alertResult to display alert ("Really remove all linked files and private notes from " & name of first document as string) & "?" buttons {"Cancel", "OK"} default button "OK" cancel button "Cancel" as warning if button returned of alertResult is "OK" ...
3b5881cb-63f4-463f-b02d-9115e5684306
{ "language": "AppleScript" }
```applescript -- execute_iterm.scpt -- last change: 19 Jan 2013 --- -- this script require an argument that represent the command to execute on run argv set command to (item 1 of argv) tell application "iTerm" try set mysession to current session of current terminal on error ...
```applescript -- execute_iterm.scpt -- last change: 19 Jan 2013 --- -- this script require an argument that represent the command to execute on run argv set command to (item 1 of argv) tell application "iTerm" repeat with _terminal in terminals repeat with _session in (every session of _termina...
4b529869-6c5b-44e1-934c-aa5199089403
{ "language": "AppleScript" }
```applescript # AppleScript folder action for the pdfmatch command # # Open with script editor, compile and save to # ~/Library/Workflows/Applications/Folder\ Actions/ # # Then open the "Folder Actions Setup" application and add the work folder # where your pdfmatch.json config lives and attach this script. # on addin...
```applescript # AppleScript folder action for the pdfmatch command # # Open with script editor, compile and save to # ~/Library/Workflows/Applications/Folder\ Actions/ # # Then open the "Folder Actions Setup" application and add the work folder # where your pdfmatch.json config lives and attach this script. # on addin...
58224a6c-870a-467e-9d4f-cc9726aeb579
{ "language": "AppleScript" }
```applescript -- clears workflow cache, including album artwork and compiled scripts -- on loadConfig() return (load script POSIX file (do shell script "./resources/compile-config.sh")) end loadConfig on run query set config to loadConfig() try tell application "Finder" delete folder (workflowCacheFolder of ...
```applescript -- clears workflow cache, including album artwork and compiled scripts -- on loadConfig() return (load script POSIX file (do shell script "./resources/compile-config.sh")) end loadConfig on run query set config to loadConfig() try tell application "Finder" delete folder (workflowCacheFolder of ...
211ec763-8bc6-4aeb-9c8c-1219e9fabbb8
{ "language": "AppleScript" }
```applescript set theFolder to POSIX path of ((the path to me as text) & "::") set Controller to run script ("script s" & return & (read alias (POSIX file (theFolder & "/lib/controller.scpt")) as «class utf8») & return & "end script " & return & "return s") set currentTrack to Controller's getCurrentSong() set outpu...
```applescript set theFolder to POSIX path of ((the path to me as text) & "::") set Controller to run script ("script s" & return & (read alias (POSIX file (theFolder & "/lib/controller.scpt")) as «class utf8») & return & "end script " & return & "return s") set currentTrack to Controller's getCurrentSong() try set...
429928b0-cea4-48e9-81d8-6dd2aec5d0e4
{ "language": "AppleScript" }
```applescript activate application "SystemUIServer" tell application "System Events" tell process "SystemUIServer" set btMenu to (menu bar item 1 of menu bar 1 whose description contains "bluetooth") tell btMenu click try tell (menu item "Rosco's Headphones" ...
```applescript -- Source: https://www.reddit.com/r/MacOS/comments/i4czgu/big_sur_airpods_script/gck3gz3 -- Works on macOS 11 Big Sur use framework "IOBluetooth" use scripting additions set DeviceName to "Rosco's Headphones" on getFirstMatchingDevice(deviceName) repeat with device in (current application's IOBlue...
4e50861f-d892-4aff-8cb6-eb1a2e2a95ee
{ "language": "AppleScript" }
```applescript -- plays selected song or playlist directly (the Play Song v1 behavior) -- for songs, this behavior continues playing music after the song finishes on loadConfig() return (load script POSIX file (do shell script "./resources/compile-config.sh")) end loadConfig on run query set config to loadConfig() ...
```applescript -- plays selected song or playlist directly (the Play Song v1 behavior) -- for songs, this behavior continues playing music after the song finishes on loadConfig() return (load script POSIX file (do shell script "./resources/compile-config.sh")) end loadConfig on run query set config to loadConfig() ...
82bde5f0-ed75-4a75-8f40-bb04166f8585
{ "language": "AppleScript" }
```applescript -- This Applescript changes all of the icon labels on the disk image to -- a different color. -- Usage: osascript set-labels.applescript <volume-name> -- where <volume-name> is the volume name of the disk image. on run argv tell application "Finder" set diskname to item 1 of argv set file_list to ...
```applescript -- This Applescript changes all of the icon labels on the disk image to -- a different color. -- Usage: osascript set-labels.applescript <volume-name> -- where <volume-name> is the volume name of the disk image. on run argv tell application "Finder" set diskname to item 1 of argv tell disk disknam...
adcd9980-badf-4ea4-9b84-c9a10e9c731b
{ "language": "AppleScript" }
```applescript on run {input} try do shell script "$HOME/Dropbox\\ \\(Personal\\)/projects/plover-tools/plover-dictionary-lookup/dictlook -x " & "\"" & input & "\"" display dialog result buttons {"OK"} default button 1 on error display dialog "No such luck." buttons {"OK"} default button 1 beep en...
```applescript on run {input} try do shell script "$HOME/Dropbox\\ \\(Personal\\)/projects/plover-tools/plover-dictionary-lookup/dictlook -x " & "\"" & input & "\"" display dialog result default answer "" buttons {"OK"} default button 1 on error display dialog "No such luck." buttons {"OK"} default butt...
b6ac4568-ae91-4784-8e04-92d6b6e71e78
{ "language": "AppleScript" }
```applescript set close_vagrant to "z puppet; git pull; vagrant halt -f;" -- close vagrant tell application "iTerm" activate set myterm to (make new terminal) tell myterm launch session "Default" set mysession to current session end tell tell mysession write text close_vagrant end tell delay 5 end tell...
```applescript set close_vagrant to "z puppet; vagrant halt -f;" -- close vagrant tell application "iTerm" activate set myterm to (make new terminal) tell myterm launch session "Default" set mysession to current session end tell tell mysession write text close_vagrant end tell delay 5 end tell -- quit ...
1160ceac-cfa3-4659-8edd-fe8fff113410
{ "language": "AppleScript" }
```applescript set myTabs to {"http://app.getsentry.com/", "http://app.ubervu.com/", "http://github.com/uberVU/thehole/issues/assigned/palcu?direction=desc&labels=&milestone=&page=1&sort=updated&state=open/", "https://mail.google.com/mail/u/1/?shva=1#inbox", "https://drive.google.com/a/ubervu.com/#folders/0BzycGIkC5P50...
```applescript set myTabs to {"http://app.getsentry.com/", "http://github.com/uberVU/thehole/issues/assigned/palcu?direction=desc&labels=&milestone=&page=1&sort=updated&state=open/", "https://mail.google.com/mail/u/1/?shva=1#inbox", "https://drive.google.com/a/hootsuite.com/#folders/0BwuFsHJDxJWPYmxXQ1VQVlN6T2M"} tell ...
d2f54b99-601c-4588-993b-e1a3fb43dc5d
{ "language": "AppleScript" }
```applescript set broker to "h8.opera.com" set workers to {"h6.opera.com", "h8.opera.com", "h9.opera.com", "h10.opera.com"} tell application "iTerm" activate set myterm to (make new terminal) tell myterm set number of columns to 80 set number of rows to 50 repeat with workerhost in ...
```applescript set broker to "h8.opera.com" set workers to {"h6.opera.com", "h8.opera.com", "h9.opera.com", "h10.opera.com"} set clock to "h6.opera.com" tell application "iTerm" activate set myterm to (make new terminal) tell myterm set number of columns to 80 set number of rows to 50 ...
bd7a265a-5ae0-4da2-ac42-5a8f1f635890
{ "language": "AppleScript" }
```applescript (* Script object to make calling a defined function easier while in the iTunes and System Events name space. *) script remoteSpeakerFinder -- Given a list of buttons, find the remote speakers button -- by finding the first button with a name that isn't in a -- rejection list. on findCorrectB...
```applescript (* Script object to make calling a defined function easier while in the iTunes and System Events name space. *) script remoteSpeakerFinder -- Given a list of buttons, find the remote speakers button -- by finding the first button with a name that isn't in a -- rejection list. on findCorrectB...
2b395141-0660-4957-ab8b-0dfc508ab5ac
{ "language": "AppleScript" }
```applescript set myTabs to {"http://app.getsentry.com/", "http://github.com/uberVU/thehole/issues/assigned/palcu?direction=desc&labels=&milestone=&page=1&sort=updated&state=open/", "https://mail.google.com/mail/u/1/?shva=1#inbox", "https://drive.google.com/a/hootsuite.com/#folders/0BwuFsHJDxJWPYmxXQ1VQVlN6T2M"} tell ...
```applescript set myTabs to {"https://github.com/search?utf8=%E2%9C%93&q=assignee%3Apalcu+state%3Aopen&type=Issues&ref=searchresults", "https://mail.google.com/mail/u/1/?shva=1#inbox", "https://drive.google.com/a/hootsuite.com/#folders/0BwuFsHJDxJWPYmxXQ1VQVlN6T2M"} tell application "Google Chrome" activate repeat w...
cd413a4e-a07e-46ce-ae54-6c08225253c6
{ "language": "AppleScript" }
```applescript try get application id "com.stairways.keyboardmaestro.engine" on error err_msg number err_num return "Keyboard Maestro not found. First install it and then use this workflow." end try tell application id "com.stairways.keyboardmaestro.engine" gethotkeys with asstring end tell ``` Update script to ge...
```applescript try get application id "com.stairways.keyboardmaestro.engine" on error err_msg number err_num return "Keyboard Maestro not found. First install it and then use this workflow." end try tell application id "com.stairways.keyboardmaestro.engine" gethotkeys with asstring and getall end tell ```
b2e118ab-1119-47bb-83a6-66e5dfa51e27
{ "language": "AppleScript" }
```applescript set open_vagrant to "z puppet; vagrant up;" tell application "iTerm" activate try set mysession to current session of current terminal on error set myterm to (make new terminal) tell myterm launch session "Default" set mysession to current session end tell end try tell mysession w...
```applescript set open_vagrant to "z puppet; vagrant up;" set update_master to "/Users/alex/.homesick/repos/palcu/dotfiles/scripts/update_master.sh;" tell application "iTerm" activate try set mysession to current session of current terminal on error set myterm to (make new terminal) tell myterm launch ses...
411e7e86-d37a-47eb-9931-ea55f6f9719c
{ "language": "Arc" }
```arc (seval '(require file/glob)) (def glob (pat) (each path (seval!glob pat #:capture-dotfiles? #t) (let path (seval!path->string path) (if (dir-exists path) (out (+ path "/")) (out path))))) ``` Update GLOB to remove the cwd from each result
```arc (seval '(require file/glob)) (seval '(xdef cwd cwd)) (def glob (pat (o root (cwd))) (each path (seval!glob pat #:capture-dotfiles? #t) (aand (seval!path->string path) (if (dir-exists it) (+ it "/") it) (if (seval!string-prefix? it root) (cut it (len root)) ...
4a12c68f-cb98-457e-bdaa-a1929b8ed925
{ "language": "Arc" }
```arc (system "rm -rf html") (ensure-dir "html") (load "template.arc") (runall) ;; fails with "Expected tests" error ;; (run "foundation-doc.tem") (system "cp foundation-doc.html html/") (system "rm -rf output") (ensure-dir "output") (system "cp docs/* html/* output/") ``` Disable atstrings when generating arcfn do...
```arc (declare 'atstrings nil) (system "rm -rf html") (ensure-dir "html") (load "template.arc") (runall) ;; fails with "Expected tests" error ;; (run "foundation-doc.tem") (system "cp foundation-doc.html html/") (system "rm -rf output") (ensure-dir "output") (system "cp docs/* html/* output/") ```
df66c44c-cf75-43b7-bf2b-2fa9a4fd6661
{ "language": "Arduino" }
```arduino const int BUFFER_SIZE = 4; int m_buffer[BUFFER_SIZE]; int m_bufIndex = 0; void setup() { // put your setup code here, to run once: Serial.begin(9600); } void loop() { // put your main code here, to run repeatedly: int val = readValue(); //Serial.print("Voltage"); //Serial.print("\t"); Serial....
```arduino const int BUFFER_SIZE = 8; int m_buffer[BUFFER_SIZE]; int m_bufIndex = 0; unsigned long m_timer = 0; int m_counter = 0; void setup() { // put your setup code here, to run once: Serial.begin(9600); m_timer = millis(); // Timer0 is already used for millis() - we'll just interrupt somewhere // in t...
759bac8a-5c1a-48aa-bc67-b0efdf39709d
{ "language": "Arduino" }
```arduino // Interduino is the physical manifestation of cigtee - an arduino sketch designed to take serial commands to make stuff happen IRL void setup() { Serial.begin(9600); pinMode(13, OUTPUT); } int pinState[6]; void loop() { if(Serial.available()){ int ledState = Serial.read(); if(ledState == 65){ ...
```arduino // Interduino is the physical manifestation of cigtee - an arduino sketch designed to take serial commands to make stuff happen IRL void setup() { Serial.begin(9600); pinMode(13, OUTPUT); } int pinState[6]; void loop() { if(Serial.available()){ int ledState = Serial.read(); if(ledState == 65){ ...
77292e92-df8f-4252-8289-8e5604b20315
{ "language": "Arduino" }
```arduino #include <WaveHC.h> #include <WaveUtil.h> SdReader card; // This object holds the information for the card FatVolume vol; // This holds the information for the partition on the card FatReader root; // This holds the information for the volumes root directory WaveHC wave; // This is the only wa...
```arduino #include <WaveHC.h> #include <WaveUtil.h> String fileNames[4] = {"BUGS2.WAV", "DAFFY1.WAV", "BUGS1.WAV", "DAFFY2.WAV"}; SdReader card; // This object holds the information for the card FatVolume vol; // This holds the information for the partition on the card FatReader root; // This holds the infor...
331989a2-4e55-45fd-a33b-3cc5e9d33d28
{ "language": "Arduino" }
```arduino #include "ConfigManager.h" struct Config { char name[20]; bool enabled; int8 hour; char password[20]; } config; struct Metadata { int8 version; } meta; ConfigManager configManager; void createCustomRoute(ESP8266WebServer *server) { server->on("/custom", HTTPMethod::HTTP_GET, [serv...
```arduino #include "ConfigManager.h" struct Config { char name[20]; bool enabled; int8 hour; char password[20]; } config; struct Metadata { int8 version; } meta; ConfigManager configManager; void createCustomRoute(ESP8266WebServer *server) { server->on("/custom", HTTPMethod::HTTP_GET, [serv...
72803cb1-5611-429e-9830-c8e0e01e4c88
{ "language": "Arduino" }
```arduino // Interduino is the physical manifestation of cigtee - an arduino sketch designed to take serial commands to make stuff happen IRL void setup() { Serial.begin(9600); pinMode(13, OUTPUT); } int pinState[6]; void loop() { if(Serial.available()){ int ledState = Serial.read(); if(ledState == 65){ ...
```arduino // Interduino is the physical manifestation of cigtee - an arduino sketch designed to take serial commands to make stuff happen IRL void setup() { Serial.begin(9600); pinMode(13, OUTPUT); } int pinState[6]; void loop() { if(Serial.available()){ int ledState = Serial.read(); if(ledState == 65){ ...
d3b6af65-5d00-4ab2-8f8e-a16761dbf493
{ "language": "Arduino" }
```arduino const int outPinLed = 2; const int inPinTrigger = 7; const int inPinDetector = 4; int triggerPressed = 0; void setup() { // put your setup code here, to run once: Serial.begin(9600); pinMode(outPinLed, OUTPUT); digitalWrite(outPinLed, LOW); pinMode(inPinTrigger, INPUT); pinMode(inPinDetecto...
```arduino const int outPinLed = 2; const int inPinTrigger = 7; const int inPinDetector = A0; int triggerPressed = 0; int detectorValue = 1023; void setup() { // put your setup code here, to run once: Serial.begin(9600); pinMode(outPinLed, OUTPUT); digitalWrite(outPinLed, LOW); pinMode(inPinTrigger, INP...
7d5e6b08-3091-45cc-b7b0-f735368de4cd
{ "language": "Arduino" }
```arduino ``` Add first LDR sensor to sketch
```arduino /* Arduino based self regulating kitchen garden */ // light related setup int lightSensorPin = 3; // Set to whereever light sensor is connected int lampRelay = 4; // Set to whereever relay for lamp is connected // activity led setup int ledPin = 13; // this is just for checking activity // Initialize ...