commit
stringlengths
40
40
old_file
stringlengths
4
264
new_file
stringlengths
4
264
old_contents
stringlengths
0
4.24k
new_contents
stringlengths
1
5.44k
subject
stringlengths
14
778
message
stringlengths
15
9.92k
lang
stringclasses
277 values
license
stringclasses
13 values
repos
stringlengths
5
127k
d58d24a9f258c94567011528531fb52fe37a590c
src/util-streams-texts-tr.ads
src/util-streams-texts-tr.ads
----------------------------------------------------------------------- -- 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, 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 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Texts.Transforms; with Ada.Characters.Handling; package Util.Streams.Texts.TR is new Util.Texts.Transforms (Stream => Print_Stream'Class, Char => Character, Input => String, Put => Write_Char, To_Upper => Ada.Characters.Handling.To_Upper, To_Lower => Ada.Characters.Handling.To_Lower);
Refactor Buffered_Stream and Print_Stream - move the TR package instantiation in a separate file
Refactor Buffered_Stream and Print_Stream - move the TR package instantiation in a separate file
Ada
apache-2.0
stcarrez/ada-util,stcarrez/ada-util
8ff370c0fa8abacd91d89d82d9bb3286dab803ce
src/sys/streams/util-streams-aes.adb
src/sys/streams/util-streams-aes.adb
----------------------------------------------------------------------- -- 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 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 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package body Util.Streams.AES is -- ----------------------- -- Set the encryption key and mode to be used. -- ----------------------- procedure Set_Key (Stream : in out Encoding_Stream; Data : in Ada.Streams.Stream_Element_Array; Mode : in Util.Encoders.AES.AES_Mode := Util.Encoders.AES.CBC) is begin Stream.Transform.Set_Key (Data, Mode); end Set_Key; -- ----------------------- -- Set the encryption initialization vector before starting the encryption. -- ----------------------- procedure Set_IV (Stream : in out Encoding_Stream; IV : in Util.Encoders.AES.Word_Block_Type) is begin Stream.Transform.Set_IV (IV); end Set_IV; -- ----------------------- -- Set the encryption key and mode to be used. -- ----------------------- procedure Set_Key (Stream : in out Decoding_Stream; Data : in Ada.Streams.Stream_Element_Array; Mode : in Util.Encoders.AES.AES_Mode := Util.Encoders.AES.CBC) is begin Stream.Transform.Set_Key (Data, Mode); end Set_Key; -- ----------------------- -- Set the encryption initialization vector before starting the encryption. -- ----------------------- procedure Set_IV (Stream : in out Decoding_Stream; IV : in Util.Encoders.AES.Word_Block_Type) is begin Stream.Transform.Set_IV (IV); end Set_IV; end Util.Streams.AES;
Implement operations to set the key and IV for AES-128/196/256 encryption and decryption streams
Implement operations to set the key and IV for AES-128/196/256 encryption and decryption streams
Ada
apache-2.0
stcarrez/ada-util,stcarrez/ada-util
3b72f5fd875a2a8711c20861bd4bc4addd898339
mat/src/mat-consoles.adb
mat/src/mat-consoles.adb
----------------------------------------------------------------------- -- 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 except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package body MAT.Consoles is -- ------------------------------ -- Format the address and print it for the given field. -- ------------------------------ procedure Print_Field (Console : in out Console_Type; Field : in Field_Type; Addr : in MAT.Types.Target_Addr) is Value : constant String := MAT.Types.Hex_Image (Addr); begin Console_Type'Class (Console).Print_Field (Field, Value); end Print_Field; end MAT.Consoles;
Implement the Print_Field procedure for addresses
Implement the Print_Field procedure for addresses
Ada
apache-2.0
stcarrez/mat,stcarrez/mat,stcarrez/mat
4e55afefbadee70d87661adeee432b8a22c0d6d4
src/sys/http/util-http-headers.adb
src/sys/http/util-http-headers.adb
----------------------------------------------------------------------- -- 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 except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Strings.Fixed; with Util.Strings.Tokenizers; package body Util.Http.Headers is -- Split an accept like header into multiple tokens and a quality value. -- Invoke the `Process` procedure for each token. Example: -- -- Accept-Language: de, en;q=0.7, jp, fr;q=0.8, ru -- -- The `Process` will be called for "de", "en" with quality 0.7, -- and "jp", "fr" with quality 0.8 and then "ru" with quality 1.0. procedure Split_Header (Header : in String; Process : access procedure (Item : in String; Quality : in Quality_Type)) is use Util.Strings; procedure Process_Token (Token : in String; Done : out Boolean); Quality : Quality_Type := 1.0; procedure Process_Token (Token : in String; Done : out Boolean) is Name : constant String := Ada.Strings.Fixed.Trim (Token, Ada.Strings.Both); begin Process (Name, Quality); Done := False; end Process_Token; Q, N, Pos : Natural; Last : Natural := Header'First; begin while Last < Header'Last loop Quality := 1.0; Pos := Index (Header, ';', Last); if Pos > 0 then N := Index (Header, ',', Pos); if N = 0 then N := Header'Last + 1; end if; Q := Pos + 1; while Q < N loop if Header (Q .. Q + 1) = "q=" then begin Quality := Quality_Type'Value (Header (Q + 2 .. N - 1)); exception when others => null; end; exit; elsif Header (Q) /= ' ' then exit; end if; Q := Q + 1; end loop; Util.Strings.Tokenizers.Iterate_Tokens (Content => Header (Last .. Pos - 1), Pattern => ",", Process => Process_Token'Access); Last := N + 1; else Util.Strings.Tokenizers.Iterate_Tokens (Content => Header (Last .. Header'Last), Pattern => ",", Process => Process_Token'Access); return; end if; end loop; end Split_Header; end Util.Http.Headers;
Add Split_Header (moved from Ada Server Faces)
Add Split_Header (moved from Ada Server Faces)
Ada
apache-2.0
stcarrez/ada-util,stcarrez/ada-util
65a168cff33acba4136ef47b1d3611daec369a12
test/FrontendAda/negative_field_offset.adb
test/FrontendAda/negative_field_offset.adb
-- 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;
Test handling of record fields with negative offsets.
Test handling of record fields with negative offsets. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@84851 91177308-0d34-0410-b5e6-96231b3b80d8
Ada
apache-2.0
llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm
3718050bb594704a42f70d006745a938ff3564ce
test/AdaFrontend/array_ref.adb
test/AdaFrontend/array_ref.adb
-- 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;
Test handling of ARRAY_REF when the component type is of unknown size.
Test handling of ARRAY_REF when the component type is of unknown size. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@35176 91177308-0d34-0410-b5e6-96231b3b80d8
Ada
bsd-2-clause
chubbymaggie/asap,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap,chubbymaggie/asap,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm
7826120ce04952b29a6410dae02a430da276f9e7
samples/escape.adb
samples/escape.adb
----------------------------------------------------------------------- -- 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"); -- 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 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Strings.Transforms; with Ada.Strings.Unbounded; with Ada.Text_IO; with Ada.Command_Line; procedure Escape is use Ada.Strings.Unbounded; Count : constant Natural := Ada.Command_Line.Argument_Count; begin if Count = 0 then Ada.Text_IO.Put_Line ("Usage: escape string..."); return; end if; for I in 1 .. Count loop declare S : constant String := Ada.Command_Line.Argument (I); begin Ada.Text_IO.Put_Line ("Escape javascript : " & Util.Strings.Transforms.Escape_Javascript (S)); Ada.Text_IO.Put_Line ("Escape XML : " & Util.Strings.Transforms.Escape_Xml (S)); end; end loop; end Escape;
Add simple example for text transformations
Add simple example for text transformations
Ada
apache-2.0
Letractively/ada-util,flottokarotto/ada-util,flottokarotto/ada-util,Letractively/ada-util
9e06964c79ef936f0022737b1b1cc08a897df421
src/asf-beans-requests.adb
src/asf-beans-requests.adb
----------------------------------------------------------------------- -- 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"); -- 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 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with ASF.Contexts.Faces; with ASF.Requests; package body ASF.Beans.Requests is Bean : aliased Request_Bean; -- ------------------------------ -- Get from the request object the value identified by the given name. -- Returns Null_Object if the request does not define such name. -- ------------------------------ overriding function Get_Value (Bean : in Request_Bean; Name : in String) return Util.Beans.Objects.Object is pragma Unreferenced (Bean); use type ASF.Contexts.Faces.Faces_Context_Access; Ctx : constant ASF.Contexts.Faces.Faces_Context_Access := ASF.Contexts.Faces.Current; begin if Ctx = null then return Util.Beans.Objects.Null_Object; end if; declare Req : constant ASF.Requests.Request_Access := Ctx.Get_Request; begin return Req.Get_Attribute (Name); end; end Get_Value; -- ------------------------------ -- Return the Request_Bean instance. -- ------------------------------ function Instance return Util.Beans.Objects.Object is begin return Util.Beans.Objects.To_Object (Bean'Access, Util.Beans.Objects.STATIC); end Instance; end ASF.Beans.Requests;
Implement the implicit object 'requestScope'
Implement the implicit object 'requestScope'
Ada
apache-2.0
stcarrez/ada-asf,stcarrez/ada-asf,stcarrez/ada-asf
20c643894f38c1ac7e5cc2abdc34b206aabd304f
mat/src/events/mat-events-targets.adb
mat/src/events/mat-events-targets.adb
----------------------------------------------------------------------- -- 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"); -- 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 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package body MAT.Events.Targets is -- ------------------------------ -- Add the event in the list of events and increment the event counter. -- ------------------------------ procedure Insert (Target : in out Target_Events; Event : in MAT.Types.Uint16; Frame : in MAT.Events.Frame_Info) is begin Target.Events.Insert (Event, Frame); Util.Concurrent.Counters.Increment (Target.Event_Count); end Insert; -- ------------------------------ -- Get the current event counter. -- ------------------------------ function Get_Event_Counter (Target : in Target_Events) return Integer is begin return Util.Concurrent.Counters.Value (Target.Event_Count); end Get_EVent_Counter; protected body Event_Collector is -- ------------------------------ -- Add the event in the list of events. -- ------------------------------ procedure Insert (Event : in MAT.Types.Uint16; Frame : in MAT.Events.Frame_Info) is begin null; end Insert; end Event_Collector; end MAT.Events.Targets;
Implement the Insert and Get_Event_Counter operations
Implement the Insert and Get_Event_Counter operations
Ada
apache-2.0
stcarrez/mat,stcarrez/mat,stcarrez/mat
66b841250889674cb08826b818dab2859e3ac446
awa/src/awa-mail-clients.ads
awa/src/awa-mail-clients.ads
----------------------------------------------------------------------- -- 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 file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- -- The <b>AWA.Mail.Clients</b> package defines a mail client API used by the mail module. -- It defines two interfaces that must be implemented. This allows to have an implementation -- based on an external application such as <tt>sendmail</tt> and other implementation that -- use an SMTP connection. package AWA.Mail.Clients is type Recipient_Type is (TO, CC, BCC); -- ------------------------------ -- Mail Message -- ------------------------------ -- The <b>Mail_Message</b> represents an abstract mail message that can be initialized -- before being sent. type Mail_Message is limited interface; type Mail_Message_Access is access all Mail_Message'Class; -- Set the <tt>From</tt> part of the message. procedure Set_From (Message : in out Mail_Message; Name : in String; Address : in String) is abstract; -- Add a recipient for the message. procedure Add_Recipient (Message : in out Mail_Message; Kind : in Recipient_Type; Name : in String; Address : in String) is abstract; -- Set the subject of the message. procedure Set_Subject (Message : in out Mail_Message; Subject : in String) is abstract; -- Set the body of the message. procedure Set_Body (Message : in out Mail_Message; Content : in String) is abstract; -- Send the email message. procedure Send (Message : in out Mail_Message) is abstract; -- ------------------------------ -- Mail Manager -- ------------------------------ -- The <b>Mail_Manager</b> is the entry point to create a new mail message -- and be able to send it. type Mail_Manager is limited interface; type Mail_Manager_Access is access all Mail_Manager'Class; -- Create a new mail message. function Create_Message (Manager : in Mail_Manager) return Mail_Message_Access is abstract; end AWA.Mail.Clients;
Define a set of interface to send an email and have several possible implementations
Define a set of interface to send an email and have several possible implementations
Ada
apache-2.0
stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa
0faab9a1d332931ddce2cd32bec02fbd571d46a1
regtests/util-properties-form-tests.ads
regtests/util-properties-form-tests.ads
----------------------------------------------------------------------- -- 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"); -- 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 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; package Util.Properties.Form.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new Util.Tests.Test with null record; -- Test loading a form file into a properties object. procedure Test_Parse_Form (T : in out Test); end Util.Properties.Form.Tests;
Add unit test for Parse_Form procedure
Add unit test for Parse_Form procedure
Ada
apache-2.0
stcarrez/ada-util,stcarrez/ada-util
ff36b874aba5a39aa754da01ae800bfa62826148
regtests/babel-stores-local-tests.ads
regtests/babel-stores-local-tests.ads
----------------------------------------------------------------------- -- 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 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 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; package Babel.Stores.Local.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new Util.Tests.Test with null record; -- Test the Read_File and Write_File operations. procedure Test_Read_File (T : in out Test); end Babel.Stores.Local.Tests;
Add unit tests for local store and Read_File/Write_File operations
Add unit tests for local store and Read_File/Write_File operations
Ada
apache-2.0
stcarrez/babel
7db778609de7d1a427526874ead015e65d876e6c
awa/plugins/awa-blogs/src/awa-blogs-servlets.ads
awa/plugins/awa-blogs/src/awa-blogs-servlets.ads
----------------------------------------------------------------------- -- 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"); -- 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 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Strings.Unbounded; with Ada.Calendar; with ADO; with ASF.Requests; with AWA.Storages.Servlets; package AWA.Blogs.Servlets is -- The <b>Storage_Servlet</b> represents the component that will handle -- an HTTP request received by the server. type Image_Servlet is new AWA.Storages.Servlets.Storage_Servlet with private; -- Load the data content that correspond to the GET request and get the name as well -- as mime-type and date. procedure Load (Server : in Image_Servlet; Request : in out ASF.Requests.Request'Class; Name : out Ada.Strings.Unbounded.Unbounded_String; Mime : out Ada.Strings.Unbounded.Unbounded_String; Date : out Ada.Calendar.Time; Data : out ADO.Blob_Ref); private type Image_Servlet is new AWA.Storages.Servlets.Storage_Servlet with null record; end AWA.Blogs.Servlets;
Add blog servlets definition with Image_Servlet type
Add blog servlets definition with Image_Servlet type
Ada
apache-2.0
stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa
b7ade23a81a621a19feca3d7c57033e83e321b50
src/asf-components-widgets-factory.ads
src/asf-components-widgets-factory.ads
----------------------------------------------------------------------- -- 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 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 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with ASF.Factory; package ASF.Components.Widgets.Factory is -- Get the widget component factory. function Definition return ASF.Factory.Factory_Bindings_Access; end ASF.Components.Widgets.Factory;
Define the factory for the creation of widget components
Define the factory for the creation of widget components
Ada
apache-2.0
Letractively/ada-asf,Letractively/ada-asf,Letractively/ada-asf
8021b592741bde72af9f26e8cff376e48fd57cc5
src/asf-rest-operation.adb
src/asf-rest-operation.adb
----------------------------------------------------------------------- -- 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 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 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package body ASF.Rest.Operation is URI_Mapping : aliased String := URI; Desc : aliased Static_Descriptor := (Next => null, Method => Method, Handler => Handler, Pattern => URI_Mapping'Access, Permission => Permission); function Definition return Descriptor_Access is begin return Desc'Access; end Definition; end ASF.Rest.Operation;
Implement the REST API definition package
Implement the REST API definition package
Ada
apache-2.0
stcarrez/ada-asf,stcarrez/ada-asf,stcarrez/ada-asf
a79e9939c6512db4827fc831f2689871d99cfc26
Base/Change/Context.agda
Base/Change/Context.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 τ are swapped ΔContext′ : Context → Context ΔContext′ ∅ = ∅ ΔContext′ (τ • Γ) = τ • ΔType τ • ΔContext′ Γ Γ≼ΔΓ : ∀ {Γ} → Γ ≼ ΔContext Γ Γ≼ΔΓ {∅} = ∅ Γ≼ΔΓ {τ • Γ} = drop ΔType τ • keep τ • Γ≼ΔΓ
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 τ are swapped ΔContext′ : Context → Context ΔContext′ ∅ = ∅ ΔContext′ (τ • Γ) = τ • ΔType τ • ΔContext′ Γ Γ≼ΔΓ : ∀ {Γ} → Γ ≼ ΔContext Γ Γ≼ΔΓ {∅} = ∅ Γ≼ΔΓ {τ • Γ} = drop ΔType τ • keep τ • Γ≼ΔΓ
Move function-specific comment right before function
Move function-specific comment right before function Currently, this seems a comment about the whole module. Old-commit-hash: c25e918e712496981adfe4c74f94a8d80e8e5052
Agda
mit
inc-lc/ilc-agda
2971c097d16d13188929ef857808539310db0b8e
meaning.agda
meaning.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
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 (⟨_⟩⟦_⟧)
Improve printing of resolved overloading.
Improve printing of resolved overloading. After this change, the semantic brackets will contain the syntactic thing even if Agda displays explicitly resolved overloaded notation. Old-commit-hash: c8cbc43ed8e715342e0cc3bccc98e0be2dd23560
Agda
mit
inc-lc/ilc-agda
bfcd2eb5d4fab7bcb698719c3f02fc2aea768cf3
lib/Data/Tree/Binary.agda
lib/Data/Tree/Binary.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
{-# 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) → BinTree A → ★ p Any P empty = Lift 𝟘 Any P (leaf x) = P x Any P (fork ts ts₁) = Any P ts ⊎ Any P ts₁
Add Any predicate for binary tree
Add Any predicate for binary tree
Agda
bsd-3-clause
crypto-agda/agda-nplib
4995bc2a3bd988bcf90ed2efe5b614e17b5554a0
Game/IND-CPA-alt.agda
Game/IND-CPA-alt.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ₖ → PubKey × SecKey) (Enc : PubKey → Message → Rₑ → CipherText) where M² = Bit → Message -- IND-CPA adversary in two parts Adv : ★ Adv = Rₐ → PubKey → (M² × (CipherText → Bit)) -- IND-CPA randomness supply R : ★ R = (Rₐ × Rₖ × Rₑ) -- IND-CPA games: -- * input: adversary and randomness supply -- * output b: adversary claims we are in game ⅁ b Game : ★ Game = Adv → R → Bit -- The game step by step: -- (pk) key-generation, only the public-key is needed -- (mb) send randomness, public-key and bit -- receive which message to encrypt -- (c) encrypt the message -- (b′) send randomness, public-key and ciphertext -- receive the guess from the adversary ⅁ : Bit → Game ⅁ b m (rₐ , rₖ , rₑ) = b′ where pk = proj₁ (KeyGen rₖ) ad = m rₐ pk mb = proj₁ ad b c = Enc pk mb rₑ b′ = proj₂ ad c ⅁₀ ⅁₁ : Game ⅁₀ = ⅁ 0b ⅁₁ = ⅁ 1b
Add alternative defintion for IND CPA
Add alternative defintion for IND CPA
Agda
bsd-3-clause
crypto-agda/crypto-agda
a48ff25823603032db6b1a26e4605512aefd0561
notes/FOT/FOTC/Data/Conat/ConatSL.agda
notes/FOT/FOTC/Data/Conat/ConatSL.agda
------------------------------------------------------------------------------ -- Definition of FOTC Conat using Agda's co-inductive combinators ------------------------------------------------------------------------------ {-# OPTIONS --allow-unsolved-metas #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without-K #-} module FOT.FOTC.Data.Conat.ConatSL where open import FOTC.Base open import Coinduction ------------------------------------------------------------------------------ data Conat : D → Set where cozero : Conat zero cosucc : ∀ {n} → (∞ (Conat n)) → Conat (succ₁ n) Conat-unf : ∀ {n} → Conat n → n ≡ zero ∨ (∃[ n' ] Conat n' ∧ n ≡ succ₁ n') Conat-unf cozero = inj₁ refl Conat-unf (cosucc {n} Cn) = inj₂ (n , ♭ Cn , refl) Conat-pre-fixed : ∀ {n} → (n ≡ zero ∨ (∃[ n' ] Conat n' ∧ n ≡ succ₁ n')) → Conat n Conat-pre-fixed (inj₁ h) = subst Conat (sym h) cozero Conat-pre-fixed (inj₂ (n , Cn , h)) = subst Conat (sym h) (cosucc (♯ Cn)) Conat-coind : ∀ (A : D → Set) {n} → (A n → n ≡ zero ∨ (∃[ n' ] A n' ∧ n ≡ succ₁ n')) → A n → Conat n Conat-coind A h An = {!!}
Add incomplete note on co-inductive natural numbers.
Add incomplete note on co-inductive natural numbers.
Agda
mit
asr/fotc,asr/fotc
a79e9939c6512db4827fc831f2689871d99cfc26
Base/Change/Context.agda
Base/Change/Context.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 τ are swapped ΔContext′ : Context → Context ΔContext′ ∅ = ∅ ΔContext′ (τ • Γ) = τ • ΔType τ • ΔContext′ Γ Γ≼ΔΓ : ∀ {Γ} → Γ ≼ ΔContext Γ Γ≼ΔΓ {∅} = ∅ Γ≼ΔΓ {τ • Γ} = drop ΔType τ • keep τ • Γ≼ΔΓ
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 τ are swapped ΔContext′ : Context → Context ΔContext′ ∅ = ∅ ΔContext′ (τ • Γ) = τ • ΔType τ • ΔContext′ Γ Γ≼ΔΓ : ∀ {Γ} → Γ ≼ ΔContext Γ Γ≼ΔΓ {∅} = ∅ Γ≼ΔΓ {τ • Γ} = drop ΔType τ • keep τ • Γ≼ΔΓ
Move function-specific comment right before function
Move function-specific comment right before function Currently, this seems a comment about the whole module. Old-commit-hash: c25e918e712496981adfe4c74f94a8d80e8e5052
Agda
mit
inc-lc/ilc-agda
2971c097d16d13188929ef857808539310db0b8e
meaning.agda
meaning.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
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 (⟨_⟩⟦_⟧)
Improve printing of resolved overloading.
Improve printing of resolved overloading. After this change, the semantic brackets will contain the syntactic thing even if Agda displays explicitly resolved overloaded notation. Old-commit-hash: c8cbc43ed8e715342e0cc3bccc98e0be2dd23560
Agda
mit
inc-lc/ilc-agda
bfcd2eb5d4fab7bcb698719c3f02fc2aea768cf3
lib/Data/Tree/Binary.agda
lib/Data/Tree/Binary.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
{-# 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) → BinTree A → ★ p Any P empty = Lift 𝟘 Any P (leaf x) = P x Any P (fork ts ts₁) = Any P ts ⊎ Any P ts₁
Add Any predicate for binary tree
Add Any predicate for binary tree
Agda
bsd-3-clause
crypto-agda/agda-nplib
4995bc2a3bd988bcf90ed2efe5b614e17b5554a0
Game/IND-CPA-alt.agda
Game/IND-CPA-alt.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ₖ → PubKey × SecKey) (Enc : PubKey → Message → Rₑ → CipherText) where M² = Bit → Message -- IND-CPA adversary in two parts Adv : ★ Adv = Rₐ → PubKey → (M² × (CipherText → Bit)) -- IND-CPA randomness supply R : ★ R = (Rₐ × Rₖ × Rₑ) -- IND-CPA games: -- * input: adversary and randomness supply -- * output b: adversary claims we are in game ⅁ b Game : ★ Game = Adv → R → Bit -- The game step by step: -- (pk) key-generation, only the public-key is needed -- (mb) send randomness, public-key and bit -- receive which message to encrypt -- (c) encrypt the message -- (b′) send randomness, public-key and ciphertext -- receive the guess from the adversary ⅁ : Bit → Game ⅁ b m (rₐ , rₖ , rₑ) = b′ where pk = proj₁ (KeyGen rₖ) ad = m rₐ pk mb = proj₁ ad b c = Enc pk mb rₑ b′ = proj₂ ad c ⅁₀ ⅁₁ : Game ⅁₀ = ⅁ 0b ⅁₁ = ⅁ 1b
Add alternative defintion for IND CPA
Add alternative defintion for IND CPA
Agda
bsd-3-clause
crypto-agda/crypto-agda
a48ff25823603032db6b1a26e4605512aefd0561
notes/FOT/FOTC/Data/Conat/ConatSL.agda
notes/FOT/FOTC/Data/Conat/ConatSL.agda
------------------------------------------------------------------------------ -- Definition of FOTC Conat using Agda's co-inductive combinators ------------------------------------------------------------------------------ {-# OPTIONS --allow-unsolved-metas #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without-K #-} module FOT.FOTC.Data.Conat.ConatSL where open import FOTC.Base open import Coinduction ------------------------------------------------------------------------------ data Conat : D → Set where cozero : Conat zero cosucc : ∀ {n} → (∞ (Conat n)) → Conat (succ₁ n) Conat-unf : ∀ {n} → Conat n → n ≡ zero ∨ (∃[ n' ] Conat n' ∧ n ≡ succ₁ n') Conat-unf cozero = inj₁ refl Conat-unf (cosucc {n} Cn) = inj₂ (n , ♭ Cn , refl) Conat-pre-fixed : ∀ {n} → (n ≡ zero ∨ (∃[ n' ] Conat n' ∧ n ≡ succ₁ n')) → Conat n Conat-pre-fixed (inj₁ h) = subst Conat (sym h) cozero Conat-pre-fixed (inj₂ (n , Cn , h)) = subst Conat (sym h) (cosucc (♯ Cn)) Conat-coind : ∀ (A : D → Set) {n} → (A n → n ≡ zero ∨ (∃[ n' ] A n' ∧ n ≡ succ₁ n')) → A n → Conat n Conat-coind A h An = {!!}
Add incomplete note on co-inductive natural numbers.
Add incomplete note on co-inductive natural numbers.
Agda
mit
asr/fotc,asr/fotc
07ab552eb3a92d88c26b178dd58f45c06a497826
src/main/antlr/WorkflowCatalogQueryLanguage.g4
src/main/antlr/WorkflowCatalogQueryLanguage.g4
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' | 'OR' ; OPERATOR: '!=' | '=' ; VALUE: '"' (~[\t\n])* '"' ; WHITESPACE: [ \t\r\n]+ -> skip ; // skip spaces, tabs, newlines
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_OPERATOR StringLiteral) | LPAREN and_expression RPAREN ; // LEXER AND : 'AND' | '&&' ; OR : 'OR' | '||' ; COMPARE_OPERATOR : '!=' | '=' ; LPAREN : '(' ; RPAREN : ')' ; StringLiteral : '"' (~["\\\r\n] | '\\' (. | EOF))* '"' ; AttributeLiteral : LETTER (LETTER | DIGIT | '_' | '.')* ; WS : [ \t\r\n]+ -> skip ; fragment DIGIT: [0-9]; fragment LETTER: LOWERCASE | UPPERCASE; fragment LOWERCASE: [a-z]; fragment UPPERCASE: [A-Z];
Update grammar for our Workflow Catalog Query Language (WCQL)
Update grammar for our Workflow Catalog Query Language (WCQL)
ANTLR
agpl-3.0
ow2-proactive/catalog,laurianed/catalog,laurianed/catalog,gparanthoen/workflow-catalog,yinan-liu/workflow-catalog,lpellegr/workflow-catalog,ShatalovYaroslav/catalog,ow2-proactive/catalog,laurianed/workflow-catalog,ow2-proactive/workflow-catalog,laurianed/catalog,ow2-proactive/catalog,paraita/workflow-catalog,ShatalovYaroslav/catalog,ShatalovYaroslav/catalog
7815a5a8ef4360f64bc790e73dd4aa3360ddb261
robozonky-strategy-natural/src/main/antlr4/imports/InvestmentSize.g4
robozonky-strategy-natural/src/main/antlr4/imports/InvestmentSize.g4
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); })+ { $result = result; } ; investmentSizeRatingExpression returns [InvestmentSize result] : 'Do úvěrů v ratingu ' r=ratingExpression ' investovat' i=investmentSizeRatingSubExpression { $result = new InvestmentSize($r.result, $i.result); } ;
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); })* { $result = result; } ; investmentSizeRatingExpression returns [InvestmentSize result] : 'Do úvěrů v ratingu ' r=ratingExpression ' investovat' i=investmentSizeRatingSubExpression { $result = new InvestmentSize($r.result, $i.result); } ;
Make investment size spec optional
Make investment size spec optional
ANTLR
apache-2.0
triceo/zonkybot,triceo/zonkybot,triceo/robozonky,RoboZonky/robozonky,triceo/robozonky,RoboZonky/robozonky
e1b9c9441cd5b3050dcbcd6d1b3bbf90baf775f4
java-vtl-parser/src/main/antlr4/imports/Relational.g4
java-vtl-parser/src/main/antlr4/imports/Relational.g4
grammar Relational; relationalExpression : unionExpression ; unionExpression : 'union' '(' datasetExpression (',' datasetExpression )* ')' ; datasetExpression : 'datasetExpr' NUM+; NUM : '0'..'9' ; WS : [ \t\n\t] -> skip ;
grammar Relational; relationalExpression : unionExpression | joinExpression ; unionExpression : 'union' '(' datasetExpression (',' datasetExpression )* ')' ; datasetExpression : 'datasetExpr' NUM+; joinExpression : '[' (INNER | OUTER | CROSS ) datasetExpression (',' datasetExpression )* ']' joinClause (',' joinClause)* ; joinClause : joinCalc | joinFilter | joinKeep | joinRename ; // | joinDrop // | joinUnfold // | joinFold ; joinCalc : 'TODO' ; joinFilter : 'TODO' ; joinKeep : 'TODO' ; joinRename : 'TODO' ; INNER : 'inner' ; OUTER : 'outer' ; CROSS : 'cross' ; NUM : '0'..'9' ; WS : [ \t\n\t] -> skip ;
Add joinExpression to the relationalExpression
Add joinExpression to the relationalExpression
ANTLR
apache-2.0
statisticsnorway/java-vtl,hadrienk/java-vtl,hadrienk/java-vtl,statisticsnorway/java-vtl,statisticsnorway/java-vtl,hadrienk/java-vtl,statisticsnorway/java-vtl
71fb6f4f004cf36f99ab540b6120f32b77b81655
Code/src/main/antlr4/nl/utwente/group10/haskell/typeparser/Type.g4
Code/src/main/antlr4/nl/utwente/group10/haskell/typeparser/Type.g4
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 : '[' type ']' ; // list type parenType : '(' type ')' ; // parenthesised constructor concreteType : constantType | variableType ; constantType : CT ; variableType : VT ;
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 listType : '[' type ']' ; // list type parenType : '(' type ')' ; // type with parentheses constantType : CT ; variableType : VT ;
Change antler grammar to support new type API
Change antler grammar to support new type API
ANTLR
mit
andrewdavidmackenzie/viskell,viskell/viskell,wandernauta/viskell
18e55457fb1e3b0a8033e9d002da0950482d08c3
Grammar/Expression.g4
Grammar/Expression.g4
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 ) ; subExpresion : LPAREN expression RPAREN ; function : name = IDENT LPAREN paramFirst = expression ( ',' paramRest += expression )* RPAREN ; CONST : INTEGER | DECIMAL; INTEGER : [0-9]+; DECIMAL : [0-9]+'.'[0-9]+; IDENT : [_A-Za-z#][_.A-Za-z#]*; LPAREN : '('; RPAREN : ')'; MULT : '*'; DIV : '/'; ADD : '+'; SUB : '-'; POW : '^'; WS : [ \r\t\u000C\n]+ -> skip ;
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 ) ; subExpresion : LPAREN expression RPAREN ; function : name = IDENT LPAREN paramFirst = expression ( ',' paramRest += expression )* RPAREN ; CONST : INTEGER | DECIMAL; INTEGER : [0-9]+; DECIMAL : [0-9]+'.'[0-9]+; IDENT : [_#A-Za-z][_#.A-Za-z0-9]*; LPAREN : '('; RPAREN : ')'; MULT : '*'; DIV : '/'; ADD : '+'; SUB : '-'; POW : '^'; WS : [ \r\t\u000C\n]+ -> skip ;
Allow numeric digits also in the identifier names.
Allow numeric digits also in the identifier names.
ANTLR
apache-2.0
GillSoftLimited/GillSoft.ExpressionEvaluator
519c14139cf90aa85d76fea7e8fd296a487def47
java-vtl-parser/src/main/antlr4/kohl/hadrien/vtl/parser/VTL.g4
java-vtl-parser/src/main/antlr4/kohl/hadrien/vtl/parser/VTL.g4
/*- * #%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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ grammar VTL; import Atoms, Clauses, Conditional, Relational; start : statement+ EOF; /* Assignment */ statement : variableRef ':=' datasetExpression; exprMember : datasetExpression ('#' componentID)? ; /* Expressions */ datasetExpression : <assoc=right>datasetExpression clauseExpression #withClause | relationalExpression #withRelational | getExpression #withGet | putExpression #withPut | exprAtom #withAtom ; componentID : IDENTIFIER; getExpression : 'get' '(' datasetId ')'; putExpression : 'put(todo)'; datasetId : STRING_CONSTANT ; WS : [ \n\r\t\u000C] -> skip ;
/*- * #%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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ grammar VTL; import Atoms, Clauses, Conditional, Relational; start : statement+ EOF; /* Assignment */ statement : variableRef ':=' datasetExpression; exprMember : datasetExpression ('#' componentID)? ; /* Expressions */ datasetExpression : <assoc=right>datasetExpression clauseExpression #withClause | relationalExpression #withRelational | getExpression #withGet | putExpression #withPut | exprAtom #withAtom ; componentID : IDENTIFIER; getExpression : 'get' '(' datasetId ')'; putExpression : 'put(todo)'; datasetId : STRING_CONSTANT ; WS : [ \n\r\t\u000C] -> skip ; COMMENT : '/*' .*? '*/' -> skip;
Add comment to the parser grammar
Add comment to the parser grammar
ANTLR
apache-2.0
hadrienk/java-vtl,statisticsnorway/java-vtl,statisticsnorway/java-vtl,statisticsnorway/java-vtl,hadrienk/java-vtl,statisticsnorway/java-vtl,hadrienk/java-vtl
3a92e65e95143653dbbd4b9029e7d7827aca0d76
Code/src/main/antlr4/nl/utwente/group10/haskell/typeparser/Type.g4
Code/src/main/antlr4/nl/utwente/group10/haskell/typeparser/Type.g4
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 : '(' innerType (',' innerType)+ ')' ; // tuple type, k>=2 listType : '[' innerType ']' ; // list type parenType : '(' innerType ')' ; // type with parentheses constantType : typeConstructor (WS* innerType)* ; typeConstructor : CT ; variableType : VT ; typeClasses : '(' typeWithClass (',' typeWithClass)* ')' '=>' | typeWithClass '=>' ; typeWithClass : typeClass WS* classedType ; classedType : VT ; typeClass : CT ;
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 : '(' innerType (',' innerType)+ ')' ; // tuple type, k>=2 listType : '[' innerType ']' ; // list type parenType : '(' innerType ')' ; // type with parentheses constantType : typeConstructor (innerType)* ; typeConstructor : CT ; variableType : VT ; typeClasses : '(' typeWithClass (',' typeWithClass)* ')' | typeWithClass ; typeWithClass : typeClass classedType ; classedType : VT ; typeClass : CT ;
Fix issue with lexing type classes with an uppercase character after the first position
Fix issue with lexing type classes with an uppercase character after the first position
ANTLR
mit
viskell/viskell,andrewdavidmackenzie/viskell,wandernauta/viskell
dc0a2c12f9cc5fdaf1d695b18cb926dea0ef9ad1
src/main/antlr/WorkflowCatalogQueryLanguage.g4
src/main/antlr/WorkflowCatalogQueryLanguage.g4
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 COMPARE_OPERATOR StringLiteral) | LPAREN and_expression RPAREN ; // LEXER AND : 'AND' | '&&' ; OR : 'OR' | '||' ; COMPARE_OPERATOR : '!=' | '=' ; LPAREN : '(' ; RPAREN : ')' ; StringLiteral : '"' (~["\\\r\n] | '\\' (. | EOF))* '"' ; AttributeLiteral : LETTER (LETTER | DIGIT | '_' | '.')* ; WS : [ \t\r\n]+ -> skip ; fragment DIGIT: [0-9]; fragment LETTER: LOWERCASE | UPPERCASE; fragment LOWERCASE: [a-z]; fragment UPPERCASE: [A-Z];
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 COMPARE_OPERATOR StringLiteral) #finalClause | LPAREN and_expression RPAREN #parenthesedClause ; // LEXER AND : 'AND' | '&&' ; OR : 'OR' | '||' ; COMPARE_OPERATOR : '!=' | '=' ; LPAREN : '(' ; RPAREN : ')' ; StringLiteral : '"' (~["\\\r\n] | '\\' (. | EOF))* '"' ; AttributeLiteral : LETTER (LETTER | DIGIT | '_' | '.')* ; WS : [ \t\r\n]+ -> skip ; fragment DIGIT: [0-9]; fragment LETTER: LOWERCASE | UPPERCASE; fragment LOWERCASE: [a-z]; fragment UPPERCASE: [A-Z];
Add aliases to clauses subterms
Add aliases to clauses subterms
ANTLR
agpl-3.0
gparanthoen/workflow-catalog,ShatalovYaroslav/catalog,yinan-liu/workflow-catalog,lpellegr/workflow-catalog,ShatalovYaroslav/catalog,laurianed/workflow-catalog,ow2-proactive/catalog,ow2-proactive/catalog,laurianed/catalog,paraita/workflow-catalog,ow2-proactive/workflow-catalog,laurianed/catalog,ow2-proactive/catalog,laurianed/catalog,ShatalovYaroslav/catalog
c222c0812214366a829b8ebccb11c84d08358e2f
CIV/Ccs/CcsLexer.g4
CIV/Ccs/CcsLexer.g4
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][A-Za-z0-9]*; fragment InputCharacter: ~[\r\n\u0085\u2028\u2029]; COMMENT : MUL InputCharacter+ | MUL ; IDENTIFIER : [A-Z][A-Za-z0-9]* ; //RENAMINGS : RENAMING ',' RENAMINGS; //RENAMING : ACTION ACTION; // ignore whitespace WHITESPACE : [ \r\n\t] + -> channel (HIDDEN);
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][A-Za-z0-9]*; fragment InputCharacter: ~[\r\n\u0085\u2028\u2029]; COMMENT : MUL InputCharacter+ | MUL ; IDENTIFIER : [A-Z][A-Za-z0-9]* ; // ignore whitespace WHITESPACE : [ \r\n\t] + -> channel (HIDDEN);
Remove useless stuff from lever grammar
Remove useless stuff from lever grammar
ANTLR
mit
lou1306/CIV,lou1306/CIV
54bdd611119013f3b8094a681883f58ef261c6c2
Code/src/main/antlr4/nl/utwente/group10/haskell/typeparser/Type.g4
Code/src/main/antlr4/nl/utwente/group10/haskell/typeparser/Type.g4
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 (',' type)+ ')' ; // tuple type, k>=2 listType : '[' type ']' ; // list type parenType : '(' type ')' ; // type with parentheses constantType : typeConstructor (WS* type)* ; typeConstructor : CT ; variableType : VT ; typeClasses : '(' typeWithClass (',' typeWithClass)* ')' '=>' ; typeWithClass : typeClass WS* classedType ; classedType : VT ; typeClass : CT ;
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 : '(' innerType (',' innerType)+ ')' ; // tuple type, k>=2 listType : '[' innerType ']' ; // list type parenType : '(' innerType ')' ; // type with parentheses constantType : typeConstructor (WS* innerType)* ; typeConstructor : CT ; variableType : VT ; typeClasses : '(' typeWithClass (',' typeWithClass)* ')' '=>' ; typeWithClass : typeClass WS* classedType ; classedType : VT ; typeClass : CT ;
Fix bug in Antlr grammar
Fix bug in Antlr grammar
ANTLR
mit
viskell/viskell,andrewdavidmackenzie/viskell,wandernauta/viskell
85b7e11fc4a86cd7bdc7878f86b597657b543bbd
src/antlr/PTP.g4
src/antlr/PTP.g4
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 | 'GenericLocation' '(' position ')' #GenericLocation | 'PatientLocation' '(' position ')' #PatientLocation | 'Filiation' '(' position ',' bool ')' #Filiation ; position : '(' x=INT ',' y=INT ')' ; bool : 'true' | 'false' ; INT: [0-9]+ ; REAL: [0-9]+ '.' [0-9]* ; WS : [ \t\r\n]+ -> skip;
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 | 'GenericLocation' '(' position ')' #GenericLocation | 'PatientLocation' '(' position ')' #PatientLocation | 'Filiation' '(' position ',' bool ')' #Filiation ; position : '(' x=INT ',' y=INT ')' ; bool : 'true' | 'false' ; INT: [0-9]+ ; REAL: [0-9]+ '.' [0-9]* ; WS : [ \t\r\n]+ -> skip; COMMENT : '/*' .*? '*/' -> skip ; LINE_COMMENT : '//' .*? '\r'? '\n' -> skip ;
Add comments to input grammar.
Add comments to input grammar.
ANTLR
mit
migulorama/feup-iart-2014,migulorama/feup-iart-2014
9776dff4dbcafe4ee9b13d52fde5fbbdc2a0f6f2
Code/src/main/antlr4/nl/utwente/group10/haskell/typeparser/Type.g4
Code/src/main/antlr4/nl/utwente/group10/haskell/typeparser/Type.g4
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 : '(' innerType (',' innerType)+ ')' ; // tuple type, k>=2 listType : '[' innerType ']' ; // list type parenType : '(' innerType ')' ; // type with parentheses constantType : typeConstructor (WS* innerType)* ; typeConstructor : CT ; variableType : VT ; typeClasses : '(' typeWithClass (',' typeWithClass)* ')' '=>' ; typeWithClass : typeClass WS* classedType ; classedType : VT ; typeClass : CT ;
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 : '(' innerType (',' innerType)+ ')' ; // tuple type, k>=2 listType : '[' innerType ']' ; // list type parenType : '(' innerType ')' ; // type with parentheses constantType : typeConstructor (WS* innerType)* ; typeConstructor : CT ; variableType : VT ; typeClasses : '(' typeWithClass (',' typeWithClass)* ')' '=>' | typeWithClass '=>' ; typeWithClass : typeClass WS* classedType ; classedType : VT ; typeClass : CT ;
Add single type class notation to type parser
Add single type class notation to type parser
ANTLR
mit
viskell/viskell,wandernauta/viskell,andrewdavidmackenzie/viskell
cbb36f12618776325394b28081a20c56218ff55a
src/Track.g4
src/Track.g4
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_name)+ ; block_name: IDENT ; NOTENAME: 'Ab' | 'A' | 'A#' | 'Bb' | 'B' | 'C' | 'C#' | 'Db' | 'D' | 'D#' | 'Eb' | 'E' | 'F' | 'F#' | 'Gb' | 'G' | 'G#' | 'R' ; OCTAVE: [0-9] | '10' ; LENGTH: [-+.]+ ; WAVE: 'triangle' | 'square' | 'sawtooth' | 'noise' ; IDENT: [a-zA-Z][a-zA-Z0-9_]+ ; WS: [\t\r\n ]+ -> skip ;
Add first attempt at track grammar
Add first attempt at track grammar
ANTLR
mit
hdgarrood/klasma
aebb88195e0e5de2b0f411682c5cb2e9c763c36d
src/antlr/PTP.g4
src/antlr/PTP.g4
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 | 'GenericLocation' '(' position ')' #GenericLocation | 'PatientLocation' '(' position ')' #PatientLocation | 'Filiation' '(' position ',' bool ')' #Filiation ; position : '(' x=INT ',' y=INT ')' ; bool : 'true' | 'false' ; INT: [0-9]+ ; REAL: [0-9]+ '.' [0-9]* ; WS : [ \t\r\n]+ -> skip;
Create prolog/scala based ANTLR 4 grammar to use to parse input files.
Create prolog/scala based ANTLR 4 grammar to use to parse input files.
ANTLR
mit
migulorama/feup-iart-2014,migulorama/feup-iart-2014
bdbf016eca2e0a116b46ecef3a578dafd48a0390
viper/grammar/Viper.g4
viper/grammar/Viper.g4
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* ; parameter: arg_label? argless_parameter ; argless_parameter: param_name ':' param_type ; arg_label: NAME ; param_name: NAME ; param_type: type_expr ; type_expr: NAME ; suite: ( simple_stmt | NEWLINE INDENT stmt+ DEDENT ) ; stmt: ( simple_stmt | compound_stmt ) ; simple_stmt: expr_stmt NEWLINE ; expr_stmt: ( expr_list | 'pass' | 'return' expr_list? ) ; expr_list: expr (',' expr)* ; expr: atom_expr ; atom_expr: atom trailer* ; atom: ( '(' expr_list? ')' | NAME | NUMBER | STRING | '...' | 'Zilch' | 'True' | 'False' ) ; trailer: ( '(' arg_list? ')' | '.' NAME ) ; compound_stmt: ( func_def | object_def | data_def ) ; object_def: ( class_def | interface_def | implementation_def ) ; class_def: 'class' common_def ; interface_def: 'interface' common_def ; implementation_def: NAME common_def ; data_def: 'data' common_def ; common_def: NAME ('(' arg_list? ')')? ':' suite ; arg_list: argument (',' argument)* ; argument: expr ;
Add grammar in ANTLR 4 format
Add grammar in ANTLR 4 format
ANTLR
apache-2.0
pdarragh/Viper
b879e117963635056adf1d2029e3d4e6d44eede4
sites/default.vhost
sites/default.vhost
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; include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME /status; fastcgi_pass unix:/var/run/php5-fpm.sock; } location /ping { access_log off; allow all; include fastcgi_params; fastcgi_param SCRIPT_FILENAME /ping; fastcgi_pass unix:/Var/run/php5-fpm.sock; } location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { expires max; log_not_found off; access_log off; } location ~ \.php$ { try_files $uri =404; include fastcgi_params; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_pass unix:/var/run/php5-fpm.sock; } }
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 /status { access_log off; allow 172.17.0.0/16; deny all; include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME /status; fastcgi_pass unix:/var/run/php5-fpm.sock; } location /ping { access_log off; allow all; include fastcgi_params; fastcgi_param SCRIPT_FILENAME /ping; fastcgi_pass unix:/Var/run/php5-fpm.sock; } location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { expires max; log_not_found off; access_log off; } location ~ \.php$ { try_files $uri =404; include fastcgi_params; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_pass unix:/var/run/php5-fpm.sock; } }
Remove .php extensions from url
Remove .php extensions from url
ApacheConf
mit
hector-valdivia/docker-php-mongodb-mysql-nginx
ce95cbae420b99535cdc20c267ab3af809841a3e
examples/apache2/default.vhost
examples/apache2/default.vhost
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 WSGIPassAuthorization On <Location /> AuthType Basic AuthName "LDAP Login" AuthBasicProvider file ldap AuthUserFile /path/to/.htpasswd # Your LDAP configuration here, including Require directives # This user is used by clients to download test cases and signatures Require user fuzzmanager </Location> <Location /crashmanager/rest/> Satisfy Any Allow from all </Location> <Directory /path/to/repo/FuzzManager/server> <Files wsgi.py> Order deny,allow Allow from all </Files> </Directory> </VirtualHost>
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/to/repo/FuzzManager/server/tests/ WSGIScriptAlias / /path/to/repo/FuzzManager/server/server/wsgi.py process-group=fuzzmanager.your.domain WSGIPassAuthorization On <Location /> AuthType Basic AuthName "LDAP Login" AuthBasicProvider file ldap AuthUserFile /path/to/.htpasswd # Your LDAP configuration here, including Require directives # This user is used by clients to download test cases and signatures Require user fuzzmanager </Location> <Location /crashmanager/rest/> Satisfy Any Allow from all </Location> <Location /ec2spotmanager/rest/> Satisfy Any Allow from all </Location> <Directory /path/to/repo/FuzzManager/server> <Files wsgi.py> Order deny,allow Allow from all </Files> </Directory> </VirtualHost>
Update example vhost file for Apache2
Update example vhost file for Apache2
ApacheConf
mpl-2.0
MozillaSecurity/FuzzManager,MozillaSecurity/FuzzManager,MozillaSecurity/FuzzManager,MozillaSecurity/FuzzManager
da4e577306c8e56a1caf1cac2fbea49003a1e720
apiary.apib
apiary.apib
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 of endpoints, you are expected to provide an `access_token`, managed by this section. ## Sessions [/sessions] ### Create a session [POST] + Request { "email": "mr.nobody@example.com", "password": "your-really-strong-password" } + Header Accept: application/vnd.api+json;revision=1 + Response 201 (application/json) { "access_token": "Ndf6kxgLfr_KMhAg8wMpm7Yit2cvHkv9oI8qIXWiHmZdeqI1h0cmn8p4wCEhoZS-AQY", "user_id": 1 } + Response 400 (application/json) {} + Response 401 (application/json) {}
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 of endpoints, you are expected to provide an `access_token`, managed by this section. ## Sessions [/sessions] ### Create a session [POST] + Request + Header Accept: application/vnd.api+json;revision=1 + Body { "email": "mr.nobody@example.com", "password": "your-really-strong-password" } + Response 201 (application/json) { "access_token": "Ndf6kxgLfr_KMhAg8wMpm7Yit2cvHkv9oI8qIXWiHmZdeqI1h0cmn8p4wCEhoZS-AQY", "user_id": 1 } + Response 400 (application/json) {} + Response 401 (application/json) {}
Add body section to create a new session
[DOC] Add body section to create a new session
API Blueprint
mit
FromUte/dune-api
e692e248adb849c0ba0f1b0bf50598c355a2af13
apiary.apib
apiary.apib
# 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 projects + Request (application/json) + Header Lion-Api-Version: v1 + Response 200 (application/json) + Header Lion-Api-Version: v1 + Body { "projects": [ "projectA": { "name" "projectA" // All project details } ] } ## Project management [/project/{name}] + Parameters + name (required, string) ... Project name ### Get project [GET] Fetch project details, given the projects' name. + Request (application/json) + Header Lion-Api-Version: v1 + Response 200 (application/json) + Header Lion-Api-Version: v1 + Body { "name": "Project name", "resources": [ "resource1", "..." ] } + Response 404 (application/json) + Header Lion-Api-Version: v1
# 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-Api-Version: v1` # Group Projects ## Project collection [/projects] ### List projects [GET] List all configured projects + Request (application/json) + Header Lion-Api-Version: v1 + Response 200 (application/json) + Header Lion-Api-Version: v1 + Body { "projects": [ "projectA": { "name" "projectA" // All project details } ] } ## Project management [/project/{name}] + Parameters + name (required, string) ... Project name ### Get project [GET] Fetch project details, given the projects' name. + Request (application/json) + Header Lion-Api-Version: v1 + Response 200 (application/json) + Header Lion-Api-Version: v1 + Body { "name": "Project name", "resources": [ "resource1", "..." ] } + Response 404 (application/json) + Header Lion-Api-Version: v1
Make the API version optional in the request
Make the API version optional in the request
API Blueprint
mit
sebdah/lion
390fe21cca8b9cf9d89e083a0924e5ca2249668b
apiary.apib
apiary.apib
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-bar`) ... String `id` of the Article to perform action with. Has example value. ### Retrieve a Article [GET] + Response 200 (application/json) + Header Link: <https://www.moneyadviceservice.org.uk/cy/articles/ble-i-gael-cyngor-am-ddim-ynghylch-dyled>; rel="alternate"; hreflang="cy"; title="Ble i gael cyngor am ddim ynghylch dyled" + Body { "url": "https://www.moneyadviceservice.org.uk/en/articles/where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice", "description": "Find out where you can get free, confidential help if you are struggling with debt" }
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-bar`) ... String `id` of the Article to perform action with. Has example value. ### Retrieve a Article [GET] + Response 200 (application/json) + Header Link: <https://www.moneyadviceservice.org.uk/cy/articles/ble-i-gael-cyngor-am-ddim-ynghylch-dyled>; rel="alternate"; hreflang="cy"; title="Ble i gael cyngor am ddim ynghylch dyled" + Body { "url": "https://www.moneyadviceservice.org.uk/en/articles/where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice", "description": "Find out where you can get free, confidential help if you are struggling with debt", "body": "<h2>Watch out for companies that aren't charities</h2><p>Look out for companies with misleading names that sound like debt charities but are actually commercial businesses.</p><p>Never ever pay for services from this type of company.</p>" }
Add article body to API Blueprint
Add article body to API Blueprint
API Blueprint
mit
moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend
843c0ce0539fd33f1f5d9da851466c5856ad5911
apiary.apib
apiary.apib
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) [ { "question": "Favourite programming language?", "published_at": "2015-08-05T08:40:51.620Z", "choices": [ { "choice": "Swift", "votes": 2048 }, { "choice": "Python", "votes": 1024 }, { "choice": "Objective-C", "votes": 512 }, { "choice": "Ruby", "votes": 256 } ] } ] ### Create a New Question [POST] You may create your own question using this action. It takes a JSON object containing a question and a collection of answers in the form of choices. + Request (application/json) { "question": "Favourite programming language?", "choices": [ "Swift", "Python", "Objective-C", "Ruby" ] } + Response 201 (application/json) + Headers Location: /questions/2 + Body { "question": "Favourite programming language?", "published_at": "2015-08-05T08:40:51.620Z", "choices": [ { "choice": "Swift", "votes": 0 }, { "choice": "Python", "votes": 0 }, { "choice": "Objective-C", "votes": 0 }, { "choice": "Ruby", "votes": 0 } ] }
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":"Miguel Piedrafita", "email":"soy@miguelpiedrafita.com", "github_username":"m1guelpf", "created_at":"2017-01-25 18:44:32", "updated_at":"2017-02-16 19:40:50" } ## User Organizations [/user/orgs] ### Get user organizations [GET] + Response 200 (application/json) { "id":1, "name":"Test Organization", "url":"https:\/\/api.github.com\/orgs\/test-org", "description":null, "avatar":"https:\/\/miguelpiedrafita.com\/logo.png", "invitecount":100 }
Add /user and /user/orgs api endpoints to api docs
:memo: Add /user and /user/orgs api endpoints to api docs
API Blueprint
mpl-2.0
orgmanager/orgmanager,orgmanager/orgmanager,orgmanager/orgmanager
ee013b2a4ccd066ce1357ed01e541f0d620283c0
apiary.apib
apiary.apib
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-bar`) ... String `id` of the Article to perform action with. Has example value. ### Retrieve a Article [GET] + Response 200 (application/json) + Header Link: <https://www.moneyadviceservice.org.uk/cy/articles/ble-i-gael-cyngor-am-ddim-ynghylch-dyled>; rel="alternate"; hreflang="cy"; title="Ble i gael cyngor am ddim ynghylch dyled" + Body { "url": "https://www.moneyadviceservice.org.uk/en/articles/where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice", "description": "Find out where you can get free, confidential help if you are struggling with debt", "body": "<h2>Watch out for companies that aren't charities</h2><p>Look out for companies with misleading names that sound like debt charities but are actually commercial businesses.</p><p>Never ever pay for services from this type of company.</p>" }
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` (optional, string, `cy`) ... Locale of the Article. + id (required, string, `foo-bar`) ... ID of the Article. ### Retrieve a Article [GET] + Response 200 (application/json) + Header Link: <https://www.moneyadviceservice.org.uk/cy/articles/ble-i-gael-cyngor-am-ddim-ynghylch-dyled>; rel="alternate"; hreflang="cy"; title="Ble i gael cyngor am ddim ynghylch dyled" + Body { "url": "https://www.moneyadviceservice.org.uk/en/articles/where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice", "description": "Find out where you can get free, confidential help if you are struggling with debt", "body": "<h2>Watch out for companies that aren't charities</h2><p>Look out for companies with misleading names that sound like debt charities but are actually commercial businesses.</p><p>Never ever pay for services from this type of company.</p>" }
Add locale to API Blueprint
Add locale to API Blueprint
API Blueprint
mit
moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend
74f27459b24a4fdf9615147f6b720b2bd62616e9
apiary.apib
apiary.apib
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-bar`) ... String `id` of the Article to perform action with. Has example value. ### Retrieve a Article [GET] + Response 200 (application/json) + Header Link: <https://www.moneyadviceservice.org.uk/cy/articles/ble-i-gael-cyngor-am-ddim-ynghylch-dyled>; rel="alternate"; hreflang="cy"; title="Ble i gael cyngor am ddim ynghylch dyled" + Body { "id": "where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice", "description": "Find out where you can get free, confidential help if you are struggling with debt" }
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-bar`) ... String `id` of the Article to perform action with. Has example value. ### Retrieve a Article [GET] + Response 200 (application/json) + Header Link: <https://www.moneyadviceservice.org.uk/cy/articles/ble-i-gael-cyngor-am-ddim-ynghylch-dyled>; rel="alternate"; hreflang="cy"; title="Ble i gael cyngor am ddim ynghylch dyled" + Body { "url": "https://www.moneyadviceservice.org.uk/en/articles/where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice", "description": "Find out where you can get free, confidential help if you are struggling with debt" }
Add URLs to API Blueprint
Add URLs to API Blueprint
API Blueprint
mit
moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend
4371d7b37d7dd7736e30daec9ac1279d4f8ff209
apiary.apib
apiary.apib
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` (optional, string, `cy`) ... Locale of the Article. + id (required, string, `where-to-go-to-get-free-debt-advice`) ... ID of the Article. ### Retrieve a Article [GET] + Response 200 (application/json) + Header Link: <https://www.moneyadviceservice.org.uk/cy/articles/ble-i-gael-cyngor-am-ddim-ynghylch-dyled>; rel="alternate"; hreflang="cy"; title="Ble i gael cyngor am ddim ynghylch dyled" + Body { "url": "https://www.moneyadviceservice.org.uk/en/articles/where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice", "description": "Find out where you can get free, confidential help if you are struggling with debt", "body": "<h2>Watch out for companies that aren't charities</h2><p>Look out for companies with misleading names that sound like debt charities but are actually commercial businesses.</p><p>Never ever pay for services from this type of company.</p>" }
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` (optional, string, `en`) ... Locale of the Article. + id (required, string, `where-to-go-to-get-free-debt-advice`) ... ID of the Article. ### Retrieve a Article [GET] + Response 200 (application/json) + Header Link: <https://www.moneyadviceservice.org.uk/cy/articles/ble-i-gael-cyngor-am-ddim-ynghylch-dyled>; rel="alternate"; hreflang="cy"; title="Ble i gael cyngor am ddim ynghylch dyled" + Body { "url": "https://www.moneyadviceservice.org.uk/en/articles/where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice", "description": "Find out where you can get free, confidential help if you are struggling with debt", "body": "<h2>Watch out for companies that aren't charities</h2><p>Look out for companies with misleading names that sound like debt charities but are actually commercial businesses.</p><p>Never ever pay for services from this type of company.</p>" }
Fix locale example for API Blueprint
Fix locale example for API Blueprint
API Blueprint
mit
moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend
c7ef38c2709beda905574f61d62ea58c31258785
apiary.apib
apiary.apib
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) [{ "id": 1, "content": "Jogging in park" }, { "id": 2, "content": "Pick-up posters from post-office" }] ## Article [/articles/{id}] A single Article object with all its details + Parameters + slug (required, string, `the-article`) ... String `id` of the Article to perform action with. Has example value. ### Retrieve a Article [GET] + Response 200 (application/json) + Header X-My-Header: The Value + Body { "slug": "the-article", "title": "Pick-up posters from post-office", content: "<p>La de da</p>" }
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-bar`) ... String `id` of the Article to perform action with. Has example value. ### Retrieve a Article [GET] + Response 200 (application/json) + Header X-My-Header: The Value + Body { "id": "where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice" }
Remove articles collection from API blueprint
Remove articles collection from API blueprint
API Blueprint
mit
moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend
b27491ea42a293d1fd77375a6e24e6926dd36b27
apiary.apib
apiary.apib
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-bar`) ... String `id` of the Article to perform action with. Has example value. ### Retrieve a Article [GET] + Response 200 (application/json) + Header Link: <https://www.moneyadviceservice.org.uk/cy/articles/ble-i-gael-cyngor-am-ddim-ynghylch-dyled>; rel="alternate"; hreflang="cy"; title="Ble i gael cyngor am ddim ynghylch dyled" + Body { "url": "https://www.moneyadviceservice.org.uk/en/articles/where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice", "description": "Find out where you can get free, confidential help if you are struggling with debt", "body": "<h2>Watch out for companies that aren't charities</h2><p>Look out for companies with misleading names that sound like debt charities but are actually commercial businesses.</p><p>Never ever pay for services from this type of company.</p>" }
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` (optional, string, `cy`) ... Locale of the Article. + id (required, string, `foo-bar`) ... ID of the Article. ### Retrieve a Article [GET] + Response 200 (application/json) + Header Link: <https://www.moneyadviceservice.org.uk/cy/articles/ble-i-gael-cyngor-am-ddim-ynghylch-dyled>; rel="alternate"; hreflang="cy"; title="Ble i gael cyngor am ddim ynghylch dyled" + Body { "url": "https://www.moneyadviceservice.org.uk/en/articles/where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice", "description": "Find out where you can get free, confidential help if you are struggling with debt", "body": "<h2>Watch out for companies that aren't charities</h2><p>Look out for companies with misleading names that sound like debt charities but are actually commercial businesses.</p><p>Never ever pay for services from this type of company.</p>" }
Add locale to API Blueprint
Add locale to API Blueprint
API Blueprint
mit
moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend
8b6b8d8d5bbd20a7ae5750d3fb635a2049072cd7
apiary.apib
apiary.apib
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-bar`) ... String `id` of the Article to perform action with. Has example value. ### Retrieve a Article [GET] + Response 200 (application/json) + Header X-My-Header: The Value + Body { "id": "where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice" }
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-bar`) ... String `id` of the Article to perform action with. Has example value. ### Retrieve a Article [GET] + Response 200 (application/json) + Header Link: <https://www.moneyadviceservice.org.uk/cy/articles/ble-i-gael-cyngor-am-ddim-ynghylch-dyled>; rel="alternate"; hreflang="cy"; title="Ble i gael cyngor am ddim ynghylch dyled" + Body { "id": "where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice" }
Add link header to API Blueprint
Add link header to API Blueprint
API Blueprint
mit
moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend
084318af5e97a97a8dbe519fa36fb8986de44c97
apiary.apib
apiary.apib
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-bar`) ... String `id` of the Article to perform action with. Has example value. ### Retrieve a Article [GET] + Response 200 (application/json) + Header Link: <https://www.moneyadviceservice.org.uk/cy/articles/ble-i-gael-cyngor-am-ddim-ynghylch-dyled>; rel="alternate"; hreflang="cy"; title="Ble i gael cyngor am ddim ynghylch dyled" + Body { "url": "https://www.moneyadviceservice.org.uk/en/articles/where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice", "description": "Find out where you can get free, confidential help if you are struggling with debt" }
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-bar`) ... String `id` of the Article to perform action with. Has example value. ### Retrieve a Article [GET] + Response 200 (application/json) + Header Link: <https://www.moneyadviceservice.org.uk/cy/articles/ble-i-gael-cyngor-am-ddim-ynghylch-dyled>; rel="alternate"; hreflang="cy"; title="Ble i gael cyngor am ddim ynghylch dyled" + Body { "url": "https://www.moneyadviceservice.org.uk/en/articles/where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice", "description": "Find out where you can get free, confidential help if you are struggling with debt", "body": "<h2>Watch out for companies that aren't charities</h2><p>Look out for companies with misleading names that sound like debt charities but are actually commercial businesses.</p><p>Never ever pay for services from this type of company.</p>" }
Add article body to API Blueprint
Add article body to API Blueprint
API Blueprint
mit
moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend
689bb1f568ac437dc82d7e6a9e75f3a80840e64c
apiary.apib
apiary.apib
# 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-Api-Version: v1` # Group Projects ## Project collection [/projects] ### List projects [GET] List all configured projects + Request (application/json) + Header Lion-Api-Version: v1 + Response 200 (application/json) + Header Lion-Api-Version: v1 + Body { "projects": [ "projectA": { "name" "projectA" // All project details } ] } ## Project management [/project/{name}] + Parameters + name (required, string) ... Project name ### Get project [GET] Fetch project details, given the projects' name. + Request (application/json) + Header Lion-Api-Version: v1 + Response 200 (application/json) + Header Lion-Api-Version: v1 + Body { "name": "Project name", "resources": [ "resource1", "..." ] } + Response 404 (application/json) + Header Lion-Api-Version: v1
# 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-Api-Version: v1` # Group Projects ## Project collection [/projects] ### List projects [GET] List all configured projects + Request (application/json) + Header Lion-Api-Version: v1 + Response 200 (application/json) + Header Lion-Api-Version: v1 + Body { "projects": [ "projectA": { "name" "projectA" // All project details ... } ] } ## Project management [/project/{slug}] + Parameters + slug (required, string) ... Project slug ### Get project [GET] Fetch project details, given the projects' name. + Request (application/json) + Header Lion-Api-Version: v1 + Response 200 (application/json) + Header Lion-Api-Version: v1 + Body { "name": "Project name", "slug": "project-name", "resources": [ "resource1", "..." ] } + Response 404 (application/json) + Header Lion-Api-Version: v1
Substitute name with slug for fetching projects
Substitute name with slug for fetching projects
API Blueprint
mit
sebdah/lion
d91bb3157de6c168ae4db2255ff8dc7e1db00f9e
apiary.apib
apiary.apib
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-bar`) ... String `id` of the Article to perform action with. Has example value. ### Retrieve a Article [GET] + Response 200 (application/json) + Header Link: <https://www.moneyadviceservice.org.uk/cy/articles/ble-i-gael-cyngor-am-ddim-ynghylch-dyled>; rel="alternate"; hreflang="cy"; title="Ble i gael cyngor am ddim ynghylch dyled" + Body { "id": "where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice" }
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-bar`) ... String `id` of the Article to perform action with. Has example value. ### Retrieve a Article [GET] + Response 200 (application/json) + Header Link: <https://www.moneyadviceservice.org.uk/cy/articles/ble-i-gael-cyngor-am-ddim-ynghylch-dyled>; rel="alternate"; hreflang="cy"; title="Ble i gael cyngor am ddim ynghylch dyled" + Body { "id": "where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice", "description": "Find out where you can get free, confidential help if you are struggling with debt" }
Add article description to API Blueprint
Add article description to API Blueprint
API Blueprint
mit
moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend
737d63212662bd361f9a815c0bebb0bef0ecbab6
apiary.apib
apiary.apib
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) + Headers Authorization: "Your Token" + Response 201 (application/json) [ { "name": "Dare Devil", "description": "Stunts I want to try out." } ] ### Get All Bucketlists [GET] You may create your own question using this action. It takes a JSON object containing a question and a collection of answers in the form of choices. + Request (application/json) + Headers Authorization: "Your Token" + Response 200 (application/json) + Body [ { "name": "Dare Devil", "description": "Stunts I want to try out." } ]
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 bucketlists and bucketlist items.e ## Bucketlists [/bucketlists] ### Create New Bucketlist [POST] Creates a new bucketlist under your account. + Request (application/json) + Headers Authorization: "Your Token" + Response 201 (application/json) [ { "name": "Dare Devil", "description": "Stunts I want to try out." } ] ### Get All Bucketlists [GET] You may create your own question using this action. It takes a JSON object containing a question and a collection of answers in the form of choices. + Request (application/json) + Headers Authorization: "Your Token" + Response 200 (application/json) + Body [ { "name": "Dare Devil", "description": "Stunts I want to try out." } ]
Update Introduction description for Apiary
[CHORE] Update Introduction description for Apiary
API Blueprint
mit
brayoh/bucket-list-api
f3e8afdc001f067d1bbe4e2b229e95668e144ce2
docs/src/rescues.apib
docs/src/rescues.apib
<!-- include(models.apib) --> # Group Rescues <!-- include(rescues/list.apib) --> <!-- include(rescues/create.apib) --> <!-- include(rescues/retrieve.apib) --> <!-- include(rescues/update.apib) -->
# Group Rescues <!-- include(rescues/list.apib) --> <!-- include(rescues/create.apib) --> <!-- include(rescues/retrieve.apib) --> <!-- include(rescues/search.apib) --> <!-- include(rescues/update.apib) -->
Add missing rescue search documentation
Add missing rescue search documentation
API Blueprint
bsd-3-clause
FuelRats/api.fuelrats.com,FuelRats/api.fuelrats.com,FuelRats/api.fuelrats.com
ad753b96dd3aa1a8dc98a374dab0a348b2b9a0b4
apiary.apib
apiary.apib
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` (optional, string, `cy`) ... Locale of the Article. + id (required, string, `where-to-go-to-get-free-debt-advice`) ... ID of the Article. ### Retrieve a Article [GET] + Response 200 (application/json) + Header Link: <https://www.moneyadviceservice.org.uk/cy/articles/ble-i-gael-cyngor-am-ddim-ynghylch-dyled>; rel="alternate"; hreflang="cy"; title="Ble i gael cyngor am ddim ynghylch dyled" + Body { "url": "https://www.moneyadviceservice.org.uk/en/articles/where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice", "description": "Find out where you can get free, confidential help if you are struggling with debt", "body": "<h2>Watch out for companies that aren't charities</h2><p>Look out for companies with misleading names that sound like debt charities but are actually commercial businesses.</p><p>Never ever pay for services from this type of company.</p>" }
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` (optional, string, `en`) ... Locale of the Article. + id (required, string, `where-to-go-to-get-free-debt-advice`) ... ID of the Article. ### Retrieve a Article [GET] + Response 200 (application/json) + Header Link: <https://www.moneyadviceservice.org.uk/cy/articles/ble-i-gael-cyngor-am-ddim-ynghylch-dyled>; rel="alternate"; hreflang="cy"; title="Ble i gael cyngor am ddim ynghylch dyled" + Body { "url": "https://www.moneyadviceservice.org.uk/en/articles/where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice", "description": "Find out where you can get free, confidential help if you are struggling with debt", "body": "<h2>Watch out for companies that aren't charities</h2><p>Look out for companies with misleading names that sound like debt charities but are actually commercial businesses.</p><p>Never ever pay for services from this type of company.</p>" }
Fix locale example for API Blueprint
Fix locale example for API Blueprint
API Blueprint
mit
moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend
e222329dac958aa9bb692cd7478c12eac8681584
apiary.apib
apiary.apib
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-bar`) ... String `id` of the Article to perform action with. Has example value. ### Retrieve a Article [GET] + Response 200 (application/json) + Header X-My-Header: The Value + Body { "id": "where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice" }
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-bar`) ... String `id` of the Article to perform action with. Has example value. ### Retrieve a Article [GET] + Response 200 (application/json) + Header Link: <https://www.moneyadviceservice.org.uk/cy/articles/ble-i-gael-cyngor-am-ddim-ynghylch-dyled>; rel="alternate"; hreflang="cy"; title="Ble i gael cyngor am ddim ynghylch dyled" + Body { "id": "where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice" }
Add link header to API Blueprint
Add link header to API Blueprint
API Blueprint
mit
moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend
647b9e61df96ef25c3cee99f4984eaed51b27cbd
apiary.apib
apiary.apib
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-bar`) ... String `id` of the Article to perform action with. Has example value. ### Retrieve a Article [GET] + Response 200 (application/json) + Header Link: <https://www.moneyadviceservice.org.uk/cy/articles/ble-i-gael-cyngor-am-ddim-ynghylch-dyled>; rel="alternate"; hreflang="cy"; title="Ble i gael cyngor am ddim ynghylch dyled" + Body { "id": "where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice" }
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-bar`) ... String `id` of the Article to perform action with. Has example value. ### Retrieve a Article [GET] + Response 200 (application/json) + Header Link: <https://www.moneyadviceservice.org.uk/cy/articles/ble-i-gael-cyngor-am-ddim-ynghylch-dyled>; rel="alternate"; hreflang="cy"; title="Ble i gael cyngor am ddim ynghylch dyled" + Body { "id": "where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice", "description": "Find out where you can get free, confidential help if you are struggling with debt" }
Add article description to API Blueprint
Add article description to API Blueprint
API Blueprint
mit
moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend
fe36caff58afa25db3f76df5b68ce5b4e2b1ba34
apiary.apib
apiary.apib
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-bar`) ... String `id` of the Article to perform action with. Has example value. ### Retrieve a Article [GET] + Response 200 (application/json) + Header Link: <https://www.moneyadviceservice.org.uk/cy/articles/ble-i-gael-cyngor-am-ddim-ynghylch-dyled>; rel="alternate"; hreflang="cy"; title="Ble i gael cyngor am ddim ynghylch dyled" + Body { "id": "where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice", "description": "Find out where you can get free, confidential help if you are struggling with debt" }
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-bar`) ... String `id` of the Article to perform action with. Has example value. ### Retrieve a Article [GET] + Response 200 (application/json) + Header Link: <https://www.moneyadviceservice.org.uk/cy/articles/ble-i-gael-cyngor-am-ddim-ynghylch-dyled>; rel="alternate"; hreflang="cy"; title="Ble i gael cyngor am ddim ynghylch dyled" + Body { "url": "https://www.moneyadviceservice.org.uk/en/articles/where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice", "description": "Find out where you can get free, confidential help if you are struggling with debt" }
Add URLs to API Blueprint
Add URLs to API Blueprint
API Blueprint
mit
moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend
16dd09c016c51e8075b3cc18d30f46e45a7f78a6
test/fixtures/multiple-examples.apib
test/fixtures/multiple-examples.apib
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": "bulldozer", "name": "willy" } ] - Request (application/json) + Parameters - id (number, `3`) - Response 200 (application/json; charset=utf-8) [ { "type": "bulldozer", "name": "willy" } ]
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": "bulldozer", "name": "willy" } ] + Request (application/json) + Parameters + id (number, `3`) + Response 200 (application/json; charset=utf-8) [ { "type": "bulldozer", "name": "willy" } ]
Use 4 spaces as indentation
style: Use 4 spaces as indentation
API Blueprint
mit
vladosaurus/dredd,apiaryio/dredd,vladosaurus/dredd,apiaryio/dredd,apiaryio/dredd
e3bf046ed114424fa49e736e38b52be97afca244
apiary.apib
apiary.apib
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 repo", "completed": false, "children": [ { "ID": 1, "text": "Commit changes", "completed": true }, { "ID": 2, "text": "Push to origin", "completed": false } ] }
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 repo", "completed": false, "children": [ { "ID": 1, "text": "Commit changes", "completed": true }, { "ID": 2, "text": "Push to origin", "completed": false } ] }
Correct API definition semantic issues.
Correct API definition semantic issues.
API Blueprint
mit
CheshireSwift/organising-swiftly,CheshireSwift/organising-swiftly
c2dc3d8353f066c4be0325106506e422b1a4729e
apiary.apib
apiary.apib
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) + Headers Authorization: "Your Token" + Response 201 (application/json) [ { "name": "Dare Devil", "description": "Stunts I want to try out." } ] ### Get All Bucketlists [GET] You may create your own question using this action. It takes a JSON object containing a question and a collection of answers in the form of choices. + Request (application/json) + Headers Authorization: "Your Token" + Response 200 (application/json) + Body [ { "name": "Dare Devil", "description": "Stunts I want to try out." } ]
Add Apiary Documentation for the API
Add Apiary Documentation for the API
API Blueprint
mit
brayoh/bucket-list-api
a16237e96b87c8a1988fb59dff6b0a4bb280d01c
apiary.apib
apiary.apib
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 response as validation that the API server is running. ## Retrieve the API Information [GET] + Response 200 (application/json) { "name": "Admiral API", "version": 1 } ## Group Authentication Resources related to authenticating users. ## Login [/v1/login] ### Login [POST] Authenticates a user and returns a token that the client should use for further interactions with the API server. Requests should be made with a JSON object containing the following items: + Request (application/json) { "username": "johndoe", "password": "password" } + Response 200 (application/json) { "token": "API token" } + Response 401 (application/json) { "error": 401, "message": "The specified user was invalid." } ## Registration [/v1/register] ### Register [POST] Registers a user with the specified information, and returns a new token if the registration was successful. Registration must be enabled on the server or this endpoint will return an error. + Request (application/json) { "username": "johndoe", "password": "password" } + Response 200 (application/json) { "token": "API token" } + Response 500 (application/json) { "error": 500, "message": "The server is not accepting registration." }
Add login and registration to blueprint
Add login and registration to blueprint
API Blueprint
mit
andrewmunsell/admiral
24a87630536ac8b44500309692101c88d0885701
MS3/QA/Examples/DC/SelectAdvanced.dyalog
MS3/QA/Examples/DC/SelectAdvanced.dyalog
 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 see if it gets populated msg←'Expected output was not produced.' :AndIf 'You picked: Bananas Pears'≡prev←output.Text ⍝ Make a single selection: froot←'Grapes' 'multi'SelectByText'-'froot Click'PressMe' output←Find'output' {prev≢output.Text}Retry ⍬ ⍝ Wait to see if it gets populated :AndIf (prev←output.Text)≡'You picked: ',froot ⍝ Make another selection: 'multi'SelectByText'Pears' Click'PressMe' output←Find'output' {prev≢output.Text}Retry ⍬ ⍝ Wait to see if it gets populated :AndIf (prev←output.Text)≡'You picked: ',froot,' Pears' msg←'' :EndIf
 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 see if it gets populated msg←'Expected output was not produced.' :AndIf 'You picked: Bananas Pears'≡prev←output.Text ⍝ Make a single selection: froot←'Grapes' 'multi'SelectItemText'~'froot Click'PressMe' output←Find'output' {prev≢output.Text}Retry ⍬ ⍝ Wait to see if it gets populated :AndIf (prev←output.Text)≡'You picked: ',froot ⍝ Make another selection: 'multi'SelectItemText'Pears' Click'PressMe' output←Find'output' {prev≢output.Text}Retry ⍬ ⍝ Wait to see if it gets populated :AndIf (prev←output.Text)≡'You picked: ',froot,' Pears' msg←'' :EndIf
Rename of SelectByText to SelectItemText
Rename of SelectByText to SelectItemText
APL
mit
Dyalog/MiServer,Dyalog/MiServer,Dyalog/MiServer
ead24874953313e5f434d13fa8aced2f054eac5c
MS3/Examples/DC/EditFieldSimple.dyalog
MS3/Examples/DC/EditFieldSimple.dyalog
: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 name' name←'name'F1.Add _.EditField done←'done'F1.Add _.Button'Done' done.On'click' 'CallbackFn' 'result'F1.Add _.div ⍝ a div to contain output, updated by CallbackFn ∇ ∇ r←CallbackFn :Access Public r←'#result'Replace _.p('Hello, ',(Get'name'),'!') ∇ :EndClass
: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 name' name←'name'F1.Add _.EditField done←'done'F1.Add _.Button'Done' done.On'click' 'CallbackFn' 'result'F1.Add _.div ⍝ a div to contain output, updated by CallbackFn ∇ ∇ r←CallbackFn :Access Public r←'#result'Replace _.p('Hello, ',(Get'name'),'!') ∇ :EndClass
Add missing '=' in MS3/Examples/DC/EditFieldSample
Add missing '=' in MS3/Examples/DC/EditFieldSample
APL
mit
Dyalog/MiServer,Dyalog/MiServer,Dyalog/MiServer
8f40bd95601a5f0e1bee2a40787e3ec0e362c0a2
MS3/Code/MS3Server.dyalog
MS3/Code/MS3Server.dyalog
: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 customized class :Include #.MS3SiteUtils ⍝∇:require =/MS3SiteUtils ∇ Make config :Access Public :Implements Constructor :Base config ⍝ Version warning :If 14>{⊃(//)⎕VFI ⍵/⍨2>+\'.'=⍵}2⊃'.'⎕WG'APLVersion' ⎕←'' ⎕←'MiServer 3.0 itself will run under Dyalog APL versions 13.2 and later' ⎕←'However, the MS3 MiSite uses features found only in Dyalog APL versions beginning with 14.0' ⎕←'' ⎕←'Please restart the MS3 MiSite using Dyalog APL version 14.0 or later...' → :EndIf ∇ ∇ onServerLoad :Access Public Override ⍝ Handle any server startup processing {}C ⍝ initialize CACHE ∇ :EndClass
: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 customized class :Include #.MS3SiteUtils ⍝∇:require =/MS3SiteUtils ∇ Make config :Access Public :Implements Constructor :Base config ⍝ Version warning :If 14>{⊃(//)⎕VFI ⍵/⍨2>+\'.'=⍵}2⊃'.'⎕WG'APLVersion' ⎕←'' ⎕←'MiServer 3.0 itself will run under Dyalog APL versions 13.2 and later' ⎕←'However, the MS3 MiSite uses features found only in Dyalog APL versions beginning with 14.0' ⎕←'From version 15.0, Dyalog APL is available free of charge at http://www.dyalog.com' ⎕←'' ⎕←'Please restart the MS3 MiSite using Dyalog APL version 14.0 or later...' → :EndIf ∇ ∇ onServerLoad :Access Public Override ⍝ Handle any server startup processing {}C ⍝ initialize CACHE ∇ :EndClass
Upgrade message inculdes note of 15.0+ being free.
Upgrade message inculdes note of 15.0+ being free.
APL
mit
Dyalog/MiServer,Dyalog/MiServer,Dyalog/MiServer
31522762e3e4a9e3ddfed315485fdaa02ff89d85
MS3/Examples/html/aSimple.dyalog
MS3/Examples/html/aSimple.dyalog
: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
: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
Fix to new ParseAttr syntax
APL
mit
Dyalog/MiServer,Dyalog/MiServer,Dyalog/MiServer
6054d202ca88d93d6604694a18e912e1747b485c
3-1.apl
3-1.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
#!/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
Trim fat on apl nr 1
Trim fat on apl nr 1
APL
mit
profan/advent-of-code-2015,profan/advent-of-code-2015,profan/advent-of-code-2015
05b308db282b0f8a5b61e6ce144c5c564db3fe46
MS3/Examples/HTML/abbrsample.dyalog
MS3/Examples/HTML/abbrsample.dyalog
: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.' ⍝ First we add the text 'Hover over', then Add'Hover over ' ⍝ Then we add the element 'abbr' containing the text 'THIS', ⍝ making sure the text to display when hovering over it ⍝ (the title) displays 'True Http Internet Scripts' 'title' 'True Http Internet Scripts'Add _.abbr'THIS' ⍝ then we add the final text. Add' to reveal.' ∇ :endclass
: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.' ⍝ First we add the text 'Hover over', then Add'Hover over ' ⍝ Then we add the element 'abbr' containing the text 'THIS', ⍝ making sure the text to display when hovering over it ⍝ (the title) displays 'True Http Internet Scripts' 'title' 'True Http Internet Scripts'Add _.abbr'THIS' ⍝ then we add the final text. Add' to reveal.' ∇ :endclass
Remove empty comment that messes up the index page
Remove empty comment that messes up the index page
APL
mit
Dyalog/MiServer,Dyalog/MiServer,Dyalog/MiServer
b686026f4993f3934100324bb9a4cc593f06d434
shell/cgi.apl
shell/cgi.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 ∊ '<>'
Add boilerplate APL script to serve CGI webpages
Add boilerplate APL script to serve CGI webpages I can no longer tell if I've gone insane, or I've just become bored with web development. Probably a collusion of both. Either way, getting this script working required some changes in the GNU APL preferences file (interpreter built from source: v1.5 / SVN revision 694). The following settings were changed to the designated values: * Welcome: No * Color: No * SharedVars: Disabled That last setting is especially critical for running the APL interpreter as a CGI handler. Since multiple arguments can't be passed to a hashbang (at least in Apache), we can't set --script and --noSV at the same time. This leads to an error message being spat to STDOUT when the interpreter is invoked, screwing with the HTTP headers.
APL
isc
Alhadis/Snippets,Alhadis/Snippets,Alhadis/Snippets,Alhadis/Snippets,Alhadis/Snippets
36c34b538edb8a4e8d5eabb83cdac04078676d91
lib/nehm/applescripts/add_track_to_playlist.applescript
lib/nehm/applescripts/add_track_to_playlist.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
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
Add explanation of arguments in AppleScript scripts
Add explanation of arguments in AppleScript scripts
AppleScript
mit
bogem/nehm
03e79121376c1776653bb1a70180cc1f58ef1324
autoload/applescript/iterm.scpt
autoload/applescript/iterm.scpt
-- 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 set myterm to (make new terminal) tell myterm launch session "Default" set mysession to current session end tell end try -- execute the command tell mysession write text command end tell end tell end run
-- 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 set myterm to (make new terminal) tell myterm launch session "rspec" set mysession to current session end tell end try -- execute the command tell mysession write text command end tell end tell end run
Change session name to 'rspec'
Change session name to 'rspec'
AppleScript
mit
chautoni/tube.vim
7624fbc0053bb4f97f1af4e4ef0d826b470cf435
lib/scripts/get_state.applescript
lib/scripts/get_state.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 cstate to cstate & "}" return cstate end tell
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's text item delimiters to "" return this_text end replace_chars tell application "Spotify" -- force string coercion and locale format set position to "" & player position set cstate to "{" set cstate to cstate & "\"track_id\": \"" & current track's id & "\"" set cstate to cstate & ",\"volume\": " & sound volume -- replace , with . when locale has , as decimal delimiter set cstate to cstate & ",\"position\": " & my replace_chars(position, ",", ".") set cstate to cstate & ",\"state\": \"" & player state & "\"" set cstate to cstate & "}" return cstate end tell
Fix get state for locales that have commas as decimal delimiters
Fix get state for locales that have commas as decimal delimiters When your current set locale uses "," as decimal delimiter, AppleScript will automatically use this when you convert the number to a string. This will break the JSON parsing for the callback, as "," is invalid when not in quotes.
AppleScript
mit
andrehaveman/spotify-node-applescript
c7f2827b9a9923cf0ce0e07e6762feb40c67941e
Filterer.applescript
Filterer.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" then save first document in "Filtered " & (name of first document as string) & ".bib" repeat with thePub in first document's publications set thePub's note to my splitNote(thePub's note) repeat with theFile in thePub's linked files remove theFile from thePub end repeat end repeat save first document end if on error -128 display dialog "User cancelled." end try end tell end run to splitNote(theNoteText) try set oldDelims to AppleScript's text item delimiters set AppleScript's text item delimiters to {"---"} set theParts to every text item of theNoteText if length of theParts is greater than 1 then set outText to text 2 through end of last item of theParts else set outText to "" end if set AppleScript's text item delimiters to oldDelims on error set AppleScript's text item delimiters to oldDelims end try return outText end splitNote
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" then set theDocument to first document save theDocument set theFile to (theDocument's file) as alias tell application "Finder" set theContainer to (container of theFile) as alias set newFile to make new file with properties {container:theFile, name:"Filtered " & ((name of theDocument) as string)} end tell return save first document in (newFile as file) repeat with thePub in first document's publications set thePub's note to my splitNote(thePub's note) repeat with theFile in thePub's linked files remove theFile from thePub end repeat end repeat save first document end if on error -128 display dialog "User cancelled." end try end tell end run to splitNote(theNoteText) try set oldDelims to AppleScript's text item delimiters set AppleScript's text item delimiters to {"---"} set theParts to every text item of theNoteText if length of theParts is greater than 1 then set outText to (text 2 through end) of last item of theParts else set outText to "" end if set AppleScript's text item delimiters to oldDelims on error set AppleScript's text item delimiters to oldDelims end try return outText end splitNote
Simplify filterer code so it actually works.
Simplify filterer code so it actually works.
AppleScript
mit
kurtraschke/htmlbib,kurtraschke/htmlbib
2b6069f41f0ecc505e5690153cc990ae6d7de5ad
autoload/applescript/iterm.scpt
autoload/applescript/iterm.scpt
-- 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 set myterm to (make new terminal) tell myterm launch session "rspec" set mysession to current session end tell end try -- execute the command tell mysession write text command end tell end tell end run
-- 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 _terminal whose name contains "rspec") tell the _session write text command end tell end repeat end repeat end tell end run
Change script for rspec command only
Change script for rspec command only
AppleScript
mit
chautoni/tube.vim
7ea28364a90a68f480bffca668cee43160abecd7
scripts/pdfmatch_folder_action.applescript
scripts/pdfmatch_folder_action.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 adding folder items to this_folder after receiving these_files try repeat with each_file in these_files tell application "System Events" if name extension of each_file is "pdf" or "tif" or "tiff" or "jpeg" or "jpg" then # You might need to add your node binary to your $PATH. For example: # export PATH=/usr/local/bin:/usr/local/opt/node@6/bin:$PATH set output to (do shell script "export PATH=/usr/local/bin:/usr/local/opt/node@6/bin:$PATH && cd '" & POSIX path of this_folder & "' && pdfmatch '" & POSIX path of each_file & "' --delete 2>&1") #display alert output end if end tell end repeat on error err_string number error_number display alert "Error " & error_number & ": " & err_string end try end adding folder items to
# 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 adding folder items to this_folder after receiving these_files try repeat with each_file in these_files tell application "System Events" if name extension of each_file is "pdf" or "tif" or "tiff" or "jpeg" or "jpg" then # You might need to add your node binary to your $PATH. For example: # export PATH=/usr/local/bin:/usr/local/opt/node@6/bin:$PATH set output to (do shell script "cd '" & POSIX path of this_folder & "' && pdfmatch '" & POSIX path of each_file & "' --delete 2>&1") #display alert output end if end tell end repeat on error err_string number error_number display alert "Error " & error_number & ": " & err_string end try end adding folder items to
Remove my $PATH setting from default apple script
Remove my $PATH setting from default apple script
AppleScript
mit
mantoni/pdfmatch.js
fa78dd8d3fe31723a568999345ab067a25671d37
actions/clearcache.applescript
actions/clearcache.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 config) end tell end try end run
-- 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 config) end tell tell application "Music" delete user playlist (workflowPlaylistName of config) end tell end try end run
Delete Alfred Play Song playlist when clearing cache
Delete Alfred Play Song playlist when clearing cache This is becoming a helpful step when troubleshooting any issues.
AppleScript
mit
caleb531/play-song,caleb531/play-song
88a5decbde7d5704dfe3d69b48308044d0b969f9
macos/chrome/current-song.scpt
macos/chrome/current-song.scpt
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 output to item 1 of currentTrack & " - " & item 2 of currentTrack do shell script "echo " & quoted form of output
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 output to quoted form of (item 1 of currentTrack & " - " & item 2 of currentTrack) on error set output to "" end try do shell script "echo " & output
Set current song to empty string if nothing is playing
Set current song to empty string if nothing is playing
AppleScript
mit
atsuya/google-music-control
a79e8801a5c5d569d6946d8620ada322a6c73d8b
hammerspoon/connect_sony.applescript
hammerspoon/connect_sony.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" of menu 1) click if exists menu item "Connect" of menu 1 then click menu item "Connect" of menu 1 return "Connecting..." else if exists menu item "Disconnect" of menu 1 then click menu item "Disconnect" of menu 1 return "Disconnecting..." end if end tell end try end tell end tell key code 53 return "Device not found or Bluetooth turned off" end tell
-- 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 IOBluetoothDevice's pairedDevices() as list) if (device's nameOrAddress as string) contains deviceName then return device end repeat end getFirstMatchingDevice on toggleDevice(device) if not (device's isConnected as boolean) then device's openConnection() return "Connecting " & (device's nameOrAddress as string) else device's closeConnection() return "Disconnecting " & (device's nameOrAddress as string) end if end toggleDevice return toggleDevice(getFirstMatchingDevice(DeviceName))
Update headphone connect script for Big Sur
Update headphone connect script for Big Sur
AppleScript
mit
rkalis/dotfiles,rkalis/dotfiles
3e9fae2fc86014b80eedc757c3ddc6ad77a54fc4
actions/play-direct.applescript
actions/play-direct.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() set typeAndId to parseResultQuery(query as text) of config set theType to type of typeAndId set theId to id of typeAndId tell application "iTunes" if theType is "song" then set theSong to getSong(theId) of config play theSong else if theType is "playlist" then set thePlaylist to getPlaylist(theId) of config play thePlaylist else log "Unknown type: " & theType end if end tell end run
-- 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() set typeAndId to parseResultQuery(query as text) of config set theType to type of typeAndId set theId to id of typeAndId tell application "iTunes" if theType is "song" then set theSong to getSong(theId) of config play theSong else if theType ends with "playlist" then set thePlaylist to getPlaylist(theId) of config play thePlaylist else log "Unknown type: " & theType end if end tell end run
Fix bug where Apple Music playlists could not be played
Fix bug where Apple Music playlists could not be played The bug in question was a regression introduced in c309730.
AppleScript
mit
caleb531/play-song,caleb531/play-song
fea9048e53742f63f867f60937203cf17597828e
indra/newview/installers/darwin/set-labels.applescript
indra/newview/installers/darwin/set-labels.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 every file in disk diskname repeat with i in file_list if the name of i is "Applications" then set the position of i to {368, 135} else if the name of i ends with ".app" then set the position of i to {134, 135} end if -- The magic happens here: This will set the label color of -- the file icon. Change the 7 to change the color: 0 is no -- label, then red, orange, yellow, green, blue, purple, or gray. set the label index of i to 7 end repeat end tell end run
-- 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 diskname set file_list to every file repeat with i in file_list if the name of i is "Applications" then set the position of i to {368, 135} else if the name of i ends with ".app" then set the position of i to {134, 135} end if -- The magic happens here: This will set the label color of -- the file icon. Change the 7 to change the color: 0 is no -- label, then red, orange, yellow, green, blue, purple, or gray. set the label index of i to 7 end repeat update without registering applications delay 4 end tell end tell end run
Make Mac disk image packager set application icon location more reliably.
Make Mac disk image packager set application icon location more reliably.
AppleScript
lgpl-2.1
gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm
83a998ecff08e3022894f03af002f0048c60410c
dictlook-ui.scpt
dictlook-ui.scpt
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 end try end run
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 button 1 beep end try end run
Add practice text area to lookup dialog
Add practice text area to lookup dialog
AppleScript
unlicense
dimonster/plover-dictionary-lookup
d7f825bf51f42726f85b82ad495f83206a039690
applescripts/halt_vagrant.applescript
applescripts/halt_vagrant.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 -- quit iTerm ignoring application responses tell application "iTerm" quit end tell end ignoring delay 2 tell application "System Events" to keystroke return
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 iTerm ignoring application responses tell application "iTerm" quit end tell end ignoring delay 2 tell application "System Events" to keystroke return
Remove git pull from closing Vagrant
Remove git pull from closing Vagrant
AppleScript
mit
smathson/dotfiles
f86f9827824ce3a105e55d6c3d713e1fce934058
applescripts/open_chrome_tabs.applescript
applescripts/open_chrome_tabs.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/0BzycGIkC5P50TXBlcTZoRXZ5VUE"} tell application "Google Chrome" activate repeat with i in myTabs open location i end repeat end tell
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 application "Google Chrome" activate repeat with i in myTabs open location i end repeat end tell
Change tabs to open at work
Change tabs to open at work
AppleScript
mit
smathson/dotfiles
7d08a4e2c7766a1d0f04c4020128e3edb1c47ca7
contrib/mac/watch-workers.applescript
contrib/mac/watch-workers.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 workers set worker to (make new session at the end of sessions) tell worker set name to workerhost set foreground color to "white" set background color to "black" set transparency to 0.1 exec command "/bin/sh -i" write text "ssh root@" & workerhost & " 'tail -f /var/log/celeryd.log'" end tell end repeat set rabbit to (make new session at the end of sessions) tell rabbit set name to "rabbit.log" set foreground color to "white" set background color to "black" set transparency to 0.1 exec command "/bin/sh -i" write text "ssh root@" & broker & " 'tail -f /var/log/rabbitmq/rabbit.log'" end tell tell the first session activate end tell end tell end tell
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 repeat with workerhost in workers set worker to (make new session at the end of sessions) tell worker set name to workerhost set foreground color to "white" set background color to "black" set transparency to 0.1 exec command "/bin/sh -i" write text "ssh root@" & workerhost & " 'tail -f /var/log/celeryd.log'" end tell end repeat set celerybeat to (make new session at the end of sessions) tell celerybeat set name to "celerybeat.log" set foreground color to "white" set background color to "black" set transparency to 0.1 exec command "/bin/sh -i" write text "ssh root@" & clock & " 'tail -f /var/log/celerybeat.log'" end tell set rabbit to (make new session at the end of sessions) tell rabbit set name to "rabbit.log" set foreground color to "white" set background color to "black" set transparency to 0.1 exec command "/bin/sh -i" write text "ssh root@" & broker & " 'tail -f /var/log/rabbitmq/rabbit.log'" end tell tell the first session activate end tell end tell end tell
Update the watch workers applescript to watch the celerybeat log file.
Update the watch workers applescript to watch the celerybeat log file.
AppleScript
bsd-3-clause
frac/celery,mitsuhiko/celery,ask/celery,frac/celery,WoLpH/celery,cbrepo/celery,mitsuhiko/celery,WoLpH/celery,ask/celery,cbrepo/celery
6d11fe3774ad16f29b5f099cdb2dc82ff33db66e
macosx/scripts/iTunes/mobile-speakers.applescript
macosx/scripts/iTunes/mobile-speakers.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 findCorrectButton (in_buttons) set buttons_to_skip to {"Burn Disc"} repeat with a_button in in_buttons try -- some buttons don't have names set the_name to name of a_button if buttons_to_skip does not contain {the_name} then return the_name end if end try end repeat return 16 -- default response end findCorrectButton end script (* Tell iTunes to use the "Mobile" set of remote speakers. *) tell application "System Events" tell process "iTunes" set the_buttons to (get buttons of window 1) set the_speaker_button to (remoteSpeakerFinder's findCorrectButton(the_buttons)) -- Switch to the speakers in my bedroom set frontmost to true click button the_speaker_button of window 1 key code 115 -- Home Key (first speaker in list) key code 125 -- Down Arrow key code 125 -- Down Arrow key code 36 -- Return Key end tell end tell
(* 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 findCorrectButton (in_buttons) set buttons_to_skip to {"Burn Disc"} repeat with a_button in in_buttons try -- some buttons don't have names set the_name to name of a_button if buttons_to_skip does not contain {the_name} then return the_name end if end try end repeat return 16 -- default response end findCorrectButton end script (* Tell iTunes to use the "Mobile" set of remote speakers. *) tell application "System Events" tell process "iTunes" set the_buttons to (get buttons of window 1) set the_speaker_button to (remoteSpeakerFinder's findCorrectButton(the_buttons)) -- Switch to the speakers in my bedroom set frontmost to true click button the_speaker_button of window 1 key code 115 -- Home Key (first speaker in list) key code 125 -- Down Arrow key code 125 -- Down Arrow key code 36 -- Return Key -- Wait for iTunes to connect to the speakers delay 5 end tell end tell
Work around an issue with iTunes 9 that causes it to delay a connection to remote speakers
Work around an issue with iTunes 9 that causes it to delay a connection to remote speakers
AppleScript
bsd-3-clause
pjones/emacsrc
acc8f3bba9d56463f8409c498fedf0bd403bc212
applescripts/open_chrome_tabs.applescript
applescripts/open_chrome_tabs.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 application "Google Chrome" activate repeat with i in myTabs open location i end repeat end tell
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 with i in myTabs open location i end repeat end tell
Update URLs that open at the office
Update URLs that open at the office
AppleScript
mit
smathson/dotfiles
9b1d578b45f6811b43803231985841a8cc865e5e
km.scpt
km.scpt
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
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
Update script to get ALL macros instead of just hotkeyed macros.
Update script to get ALL macros instead of just hotkeyed macros.
AppleScript
mit
iansinnott/alfred-maestro,iansinnott/alfred-maestro
d97b50320a0634e02f139c1218508ffd07b17894
applescripts/open_vagrant.applescript
applescripts/open_vagrant.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 write text open_vagrant end tell end tell
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 session "Default" set mysession to current session end tell end try tell mysession write text update_master write text open_vagrant end tell end tell
Add update script to open vagrant applescript
Add update script to open vagrant applescript
AppleScript
mit
smathson/dotfiles
d5daba6eca89e39288c90e7df7fb9a31cb6985f1
glob.arc
glob.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)))))
(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)) it) (out it))))
Update GLOB to remove the cwd from each result
Update GLOB to remove the cwd from each result
Arc
mit
laarc/laarc,laarc/laarc,laarc/laarc,laarc/laarc
61c0b4c697364d2946a13b10cfeba880200b74fc
extras/arcfn-docs/generate.arc
extras/arcfn-docs/generate.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/")
(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/")
Disable atstrings when generating arcfn docs.
Disable atstrings when generating arcfn docs. Maybe need to re-enable it when we add docs about atstrings. Currently just disable it to make generate.arc works.
Arc
mit
LaxWorks/news,LaxWorks/news,LaxWorks/news,LaxWorks/news
0538f13c7a02bbed22c48e66defffd83d8490c97
Arduino/photoresistorTest/photoresistorTest.ino
Arduino/photoresistorTest/photoresistorTest.ino
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.println(val); delay(5); //we're interested in events that happen roughly within 15-20 ms } int readValue() { m_buffer[m_bufIndex] = analogRead(A0); m_bufIndex = (m_bufIndex + 1) % BUFFER_SIZE; //test if median is better than avg int sum = 0; for (int n = 0; n < BUFFER_SIZE; ++n) { sum += m_buffer[n]; } return sum / BUFFER_SIZE; }
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 the middle and call the "Compare A" function below OCR0A = 0xAF; TIMSK0 |= _BV(OCIE0A); } // Interrupt is called once a millisecond (Timer0 frequency) SIGNAL(TIMER0_COMPA_vect) { int val = readValue(); //we're interested in events that happen roughly within 15-20 ms if (m_counter++ >= 4) { Serial.println(val); m_counter = 0; } } void loop() { } int readSample() { int value = m_buffer[m_bufIndex] = analogRead(A0); m_bufIndex = (m_bufIndex + 1) % BUFFER_SIZE; return value; } int readValue() { int value = readSample(); //TODO: test if median is better than avg int sum = 0; for (int n = 0; n < BUFFER_SIZE; ++n) { sum += m_buffer[n]; } return sum / BUFFER_SIZE; }
Use interrupt for timing the sample read
Use interrupt for timing the sample read
Arduino
mit
paasovaara/nes-zapper,paasovaara/nes-zapper
32450dfc4d84715c02a736a81a7de4e4464e70aa
interduino/src/sketch.ino
interduino/src/sketch.ino
// 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){ digitalWrite(13, HIGH); } if(ledState == 90){ digitalWrite(13, LOW); } delay(2000); } }
// 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){ digitalWrite(13, HIGH); } // if(ledState == 90){ // digitalWrite(13, LOW); // } delay(2000); digitalWrite(13, LOW); } }
Change logic for serial commands
Change logic for serial commands
Arduino
agpl-3.0
NegativeK/telehack,NegativeK/telehack
ab7365abca627adb621d9ebee16bebc1dcccc212
EmotionalClothing.ino
EmotionalClothing.ino
#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 wave (audio) object, since we will only play one at a time void setupSdReader(SdReader &card) { if (!card.init()) Serial.println("Card init failed"); card.partialBlockRead(true); // Optimization. Disable if having issues } void setupFatVolume(FatVolume &vol) { uint8_t slot; // There are 5 slots to look at. for (slot = 0; slot < 5; slot++) if (vol.init(card, slot)) break; if (slot == 5) Serial.println("No valid FAT partition"); } void setupFatReader(FatReader &root) { if (!root.openRoot(vol)) Serial.println("Can't open root dir"); } void setup() { Serial.begin(9600); setupSdReader(card); setupFatVolume(vol); setupFatReader(root); } void loop() { }
#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 information for the volumes root directory WaveHC wave; // This is the only wave (audio) object, since we will only play one at a time void setupSdReader(SdReader &card) { if (!card.init()) Serial.println("Card init failed"); card.partialBlockRead(true); // Optimization. Disable if having issues } void setupFatVolume(FatVolume &vol) { uint8_t slot; // There are 5 slots to look at. for (slot = 0; slot < 5; slot++) if (vol.init(card, slot)) break; if (slot == 5) Serial.println("No valid FAT partition"); } void setupFatReader(FatReader &root) { if (!root.openRoot(vol)) Serial.println("Can't open root dir"); } void setup() { Serial.begin(9600); setupSdReader(card); setupFatVolume(vol); setupFatReader(root); } void loop() { root.rewind(); FatReader file; for (int i = 0; i < 4; i++) { char fileName[fileNames[i].length() + 1]; fileNames[i].toCharArray(fileName, fileNames[i].length() + 1); file.open(root, fileName); wave.create(file); wave.play(); while (wave.isplaying) delay(100); } }
Test out some wave files
Test out some wave files
Arduino
mit
IgorGee/Emotional-Clothing
0c30491456aa01f15e0b660d7cc3e59e0428fa80
examples/simple/simple.ino
examples/simple/simple.ino
#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, [server](){ server->send(200, "text/plain", "Hello, World!"); }); } void setup() { meta.version = 3; // Setup config manager configManager.setAPName("Demo"); configManager.setAPFilename("/index.html"); configManager.addParameter("name", config.name, 20); configManager.addParameter("enabled", &config.enabled); configManager.addParameter("hour", &config.hour); configManager.addParameter("password", config.password, 20, set); configManager.addParameter("version", &meta.version, get); configManager.begin(config); configManager.setAPICallback(createCustomRoute); // } void loop() { configManager.loop(); // Add your loop code here }
#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, [server](){ server->send(200, "text/plain", "Hello, World!"); }); } void setup() { meta.version = 3; // Setup config manager configManager.setAPName("Demo"); configManager.setAPFilename("/index.html"); configManager.addParameter("name", config.name, 20); configManager.addParameter("enabled", &config.enabled); configManager.addParameter("hour", &config.hour); configManager.addParameter("password", config.password, 20, set); configManager.addParameter("version", &meta.version, get); configManager.setAPICallback(createCustomRoute); configManager.begin(config); // } void loop() { configManager.loop(); // Add your loop code here }
Move begin down in example
Move begin down in example
Arduino
mit
nrwiersma/ConfigManager,nrwiersma/ConfigManager
b2f1ef016c3d6acb02fe0d76512e6b8e7802acba
interduino/src/sketch.ino
interduino/src/sketch.ino
// 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){ digitalWrite(13, HIGH); } if(ledState == 90){ digitalWrite(13, LOW); } } }
// 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){ digitalWrite(13, HIGH); } if(ledState == 90){ digitalWrite(13, LOW); } } } int main() { setup(); while(true) { loop(); } return 0; }
Add main func to stop build from breaking on akira
Add main func to stop build from breaking on akira
Arduino
agpl-3.0
NegativeK/telehack,NegativeK/telehack
45e217a8d4a79f02b8104e28a5370b663d03d0ed
src/zapper/zapper.ino
src/zapper/zapper.ino
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(inPinDetector, INPUT); } void loop() { int triggerPrev = triggerPressed; triggerPressed = digitalRead(inPinTrigger); if (triggerPressed != triggerPrev) { Serial.print("Trigger state changed: "); Serial.println(triggerPressed); if (triggerPressed) { int detectorValue = digitalRead(inPinDetector); Serial.print("Detector: "); Serial.println(detectorValue); } } int ledState = triggerPressed ? HIGH : LOW; digitalWrite(outPinLed, ledState); }
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, INPUT_PULLUP); } void loop() { int triggerPrev = triggerPressed; triggerPressed = digitalRead(inPinTrigger); if (triggerPressed != triggerPrev) { Serial.print("Trigger state changed: "); Serial.println(triggerPressed); /*if (triggerPressed) { int detectorValue = analogRead(inPinDetector); Serial.print("Detector: "); Serial.println(detectorValue); }*/ } if (triggerPressed) { int detectorPrev = detectorValue; detectorValue = analogRead(inPinDetector); Serial.print(" Detector: "); Serial.print(detectorValue); Serial.print(" diff="); Serial.println(detectorValue - detectorPrev); } int ledState = triggerPressed ? HIGH : LOW; digitalWrite(outPinLed, ledState); }
Read detector value to A0
Read detector value to A0
Arduino
mit
paasovaara/nes-zapper,paasovaara/nes-zapper
f52d3509a2563927dfbcc9ff69c699b36c8d858e
arduinoApp/gardenSketch/gardenSketch.ino
arduinoApp/gardenSketch/gardenSketch.ino
/* 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 settings void setup() { // Initialize output pins. pinMode(ledPin, OUTPUT); // Initialize input pins. pinMode(lightSensorPin, INPUT); } // Main loop void loop() { // Read sensor values analogRead(lightSensorPin); }
Add first LDR sensor to sketch
Add first LDR sensor to sketch Initialize the first sensor on the Arduino
Arduino
apache-2.0
eikooc/KitchenGarden,eikooc/KitchenGarden,eikooc/KitchenGarden,eikooc/KitchenGarden