Author: 1u2tqe51uojr

  • weightless

    This project has reached the end of its development. Feel free to browse the code.

    Logo

    Downloads per month NPM Version Dependencies Contributors Published on webcomponents.org

    High-quality Web Components with a small footprint
    Thank you so much for showing interest in this project! If you want to help us feed our Octocat you should definitely become a stargazer. These web components are built to be used. They are lightweight, have a simple API and are easy to extend and compose. Go here to see a demo https://weightless.dev/elements.


    • High-quality: Centered around the best practices.
    • Testable: Hundreds of test-cases makes sure the library is stable.
    • Easy-to-use: But with a simple and understandable API.
    • Accessible: All components has been build with accessibility in mind.
    • Single-responsibility: Each component does one thing really well. This makes them really easy to extend and compose.

    -----------------------------------------------------

    ➤ Table of Contents

    -----------------------------------------------------

    ➤ Demo

    Go here to try the demo.

    -----------------------------------------------------

    ➤ Installation

    $ npm i weightless
    

    If you want to get started super quickly you can use the CLI.

    $ npm init web-config new my-project --lit
    

    If you prefer to use the umd bundle you can import https://unpkg.com/weightless/umd/weightless.min.js. Keep in mind that this imports all elements, so it is recommended that you only use it for test purposes.

    <script src="https://unpkg.com/weightless/umd/weightless.min.js"></script>

    -----------------------------------------------------

    ➤ Elements

    Name Tag Description Documentation Demo
    Backdrop wl-backdrop Dark layer to use behind overlayed elements. Documentation Demo
    Banner wl-banner Display a non-interruptive message and related optional actions. Documentation Demo
    Button wl-button Allow users to take actions, and make choices, with a single tap. Documentation Demo
    Card wl-card Group related content and action. Documentation Demo
    Checkbox wl-checkbox Turn an option on or off. Documentation Demo
    Dialog wl-dialog Highly interruptive messages. Documentation Demo
    Divider wl-divider Thin line that groups content in lists and layouts. Documentation Demo
    Expansion wl-expansion Provide an expandable details-summary view. Documentation Demo
    Icon wl-icon Symbols for common actions and items. Documentation Demo
    Label wl-label Make form elements more accessible. Documentation Demo
    List Item wl-list-item Display an item in a list. Documentation Demo
    Nav wl-nav Provide access to destinations in your app. Documentation Demo
    Popover wl-popover Contextual anchored elements Documentation Demo
    Popover Card wl-popover-card Give popovers a contextual flair. Documentation Demo
    Progress Bar wl-progress-bar Fills a bar from 0% to 100%. Documentation Demo
    Progress Spinner wl-progress-spinner Fills a circle from 0% to 100%. Documentation Demo
    Radio wl-radio Select one option from a set. Documentation Demo
    Ripple wl-ripple Indicate touch actions. Documentation Demo
    Select wl-select Select one or more values from a set of options. Documentation Demo
    Slider wl-slider Make selections from a range of values. Documentation Demo
    Snackbar wl-snackbar Provide brief messages at the bottom of the screen. Documentation Demo
    Switch wl-switch Turn an option on or off. Documentation Demo
    Tab wl-tab Organize navigation between groups of content. Documentation Demo
    Tab Group wl-tab-group Organize navigation between groups of content. Documentation Demo
    Text wl-text Group text into paragraphs. Documentation Demo
    Textarea wl-textarea Multiline text fields. Documentation Demo
    Textfield wl-textfield Singleline text fields. Documentation Demo
    Title wl-title Indicate the start of a new section. Documentation Demo
    Tooltip wl-tooltip Informative context related text. Documentation Demo

    -----------------------------------------------------

    ➤ Roadmap

    There’s lots of exciting things on the roadmap. Until v1.0.0 you can expect the API to be fairly stable but refactoring might still happen and break the backwards compatibility. You are very welcome to use the library, create pull requests or add issues.

    -----------------------------------------------------

    ➤ Contributing guide

    You are more than welcome to contribute to this repository! Below are some instructions on how to setup the project for development.

    1. Clone this repository by running git clone https://github.com/andreasbm/weightless.git.
    2. Run npm i to install all dependencies.
    3. Spin up the development server with npm run s. The browser should automatically be opened at the correct url. If not, you can open your browser and go to http://localhost:1350.
    4. Run tests with npm run test.
    5. Lint the files with npm run lint.
    6. Compile the documentation by running npm run docs.

    The elements are written in Typescript and the stylesheets are written in SASS. All of the web components uses lit-element.

    If you want to know more about how you can help you should definitely check out the CONTRIBUTING.md file. All contributors will be added to the contributors section below.

    -----------------------------------------------------

    ➤ Contributors

    Andreas Mehlsen You?
    Andreas Mehlsen You?

    -----------------------------------------------------

    ➤ License

    Licensed under MIT.

    Visit original content creator repository https://github.com/andreasbm/weightless
  • BirdOverlay

    Background

    This project exists because a good Owlet camera doesn’t…

    What we required

    For a baby monitor, we required the following:

    1. Local only network support, for security
    2. Support for light and dark scenes (night and day naps)
    3. Supports audio
    4. HomeKit Secure video for historical videos when our baby does something funny.
    5. An overlay for data from our Smart Sock 3

    What we found

    On the market, nothing… But a combo of available products let us do what we wanted with some work.

    What you need

    1. Owlet 3 Smart Sock (good luck buying it in the USA, thanks FDA)
    2. A wyze 3 camera with starlight sensor
    3. docker-wyze-bridge to get RTSP stream of the camera
    4. OBS to rebroadcast the stream with an overlay
    5. this tool to add the owlet overlay

    Running this software

    1. Grab OBS headless by using cieg/obs-docker:latest with docker
    2. Install rtsp-simple-server – I recomend the docker container
    3. Start running this docker container, which will publish owlet’s stats as HTML
    4. Point OBS’s source to the RTSP stream of your camera (I use wyze, any rtsp works)
    5. Add a browser source and point to this service’s HTML
    6. Setup the stream in OBS to point to your rtsp-simple-server instance
    7. Add to scrypted/blueiris/whatever you want by using the rtsp-simple-server proxy!

    HomeKit Secure

    You can add this to HKSV by using Scrypted – see that service for details. You will add this RTSP camera with the overlay as the source. A benefit of doing this is cloud recordings and AppleTV’s Picture-in-Picture mode for HK cameras meaning you can watch TV and have a small image of your baby on the screen to monitor!

    Visit original content creator repository
    https://github.com/simonsickle/BirdOverlay

  • appcenterextensions

    Build status .NET Core Quality Gate Status NuGet NuGet buymeacoffee

    AppCenterExtensions

    A set of convenience classes and extension methods to simplify Crash Reporting and Analytics using AppCenter

    Features

    • User interaction reporting using ICommand implementations
    • Automatic page tracking in Xamarin.Forms and .NET MAUI including time spent on screen
    • Extension methods for crash reporting
    • Anonymous user information configuration

    NuGet Packages

    This library is distributed as 3 nuget packages

    Getting Started

    This library is configured almost the same way as the AppCenter SDK. You provide the AppCenter secrets, and specify whether to anonymize the user information. Both Crash Reporting and Analytics are always enabled when using AppCenterSetup.

    AppCenterSetup.Instance.Start(
        "[iOS AppCenter secret]",
        "[Android AppCenter secret]",
        "[UWP AppCenter secret]",
        "[MacOS AppCenter secret]",
        "[WPF/WinForms AppCenter secret]",
        anonymizeAppCenterUser: true);

    or

    await AppCenterSetup.Instance.StartAsync(
        "[iOS AppCenter secret]",
        "[Android AppCenter secret]",
        "[UWP AppCenter secret]",
        "[MacOS AppCenter secret]",
        "[WPF/WinForms AppCenter secret]",
        anonymizeAppCenterUser: true);

    The reason for the async API here is because anonymizeAppCenterUser internally relies on an async API. The synchronous API’s for starting AppCenter are non-blocking methods that do a fire-and-forget call to StartAsync(string,bool).

    Anonymous User Information

    The component AppCenterSetup exposes a method called UseAnonymousUserIdAsync() which sets the UserId in AppCenter to the first 8 characters a GUID that is unique per app installation. This can be used as a support key for uniquely identifying application users for instrumentation and troubleshooting. The support key can be attached to all HTTP calls by using the DiagnosticDelegatingHandler

    AppCenter Crash Report

    Error Reporting

    The library exposes extension methods to the Exception class for conveniently reporting Exceptions to AppCenter

    Example:

    try
    {
        // Something that blows up
        explosives.Detonate();
    }
    catch (Exception e)
    {
        // Safely handle error then report
        e.Report();
    }

    ITrackingCommand

    This library provides 3 convenience implementations of ICommand that will report the action to AppCenter Analytics after successfully invoking the execute callback method

    • TrackingCommand – This implementation accepts an Action as the Execute callback and a Func<bool> as the CanExecute callback
    • TrackingCommand – This implementation accepts an Action<T> as the Execute callback and a Func<T, bool> as the CanExecute callback
    • AsyncTrackingCommand – This implementation accepts a Func<Task> as the execute callback and a Func<bool> as the CanExecute callback. This also exposes a CompletionTask property that the consumer can await if desired. The Execute(object parameter) method here is a non-blocking call

    Example:

    using System.Threading.Tasks;
    using System.Windows.Input;
    using AppCenterExtensions.Commands;
    using AppCenterExtensions.Extensions;
    using Microsoft.AppCenter.Crashes;
    using Xamarin.Essentials;
    
    namespace SampleApp.ViewModels
    {
        public class AboutViewModel : BaseViewModel
        {
            public AboutViewModel()
            {
                AsyncButtonTappedCommand = new AsyncTrackingCommand(
                    OnAsyncButtonTapped,
                    nameof(AsyncButtonTappedCommand).ToTrackingEventName(),
                    nameof(AboutViewModel).ToTrackingEventName());
    
                ButtonOneTappedCommand = new TrackingCommand(
                    OnButtonOneTapped,
                    nameof(ButtonOneTappedCommand).ToTrackingEventName(),
                    nameof(AboutViewModel).ToTrackingEventName());
    
                ButtonTwoTappedCommand = new TrackingCommand<string>(
                    OnButtonTapped,
                    nameof(ButtonTwoTappedCommand).ToTrackingEventName(),
                    nameof(AboutViewModel).ToTrackingEventName());
            }
    
            public ICommand AsyncButtonTappedCommand { get; }
            public ICommand ButtonOneTappedCommand { get; }
            public ICommand ButtonTwoTappedCommand { get; }
    
            private Task OnAsyncButtonTapped()
                => Browser.OpenAsync("https://xamarin.com");
    
            private void OnButtonOneTapped() { }
    
            private void OnButtonTwoTapped(string obj) { }
        }
    }

    Specifying the screenName argument in the constructor is optional and when this is not provided manually then it will use the declaring Type name from the method that instantiated the ITrackingCommand instance and convert it to a more analytics friendly event name using the ToTrackingEventName() extension method. In the example above, if the nameof(AboutViewModel).ToTrackingEventName() parameter is not provided then the owner declaring Type is AboutViewModel and the ScreenName will be set to "About"

    Automatic Page Tracking

    Automatic page tracking is enabled by replacing the base class of the ContentPage to classes to use TrackingContentPage class. By doing so the library will send page tracking information to AppCenter after leaving every page. Currently, the library will send the page Type, Title, and the duration spent on the screen. The library is rather opinionated on how to log information, and this will only change if I get a request to do so. Duration spent on screen is calculated using a Stopwatch that is started upon Page OnAppearing and is reported to Analytics upon OnDisappearing. The event name is based on the Type name of the Page and is split into multiple words based on pascal case rules and afterwards removes words like Page, View, Model, Async. For example: UserSettingsPage or UserSettingsView becomes User Settings

    XAML Example:

    <?xml version="1.0" encoding="utf-8"?>
    
    <ext:TrackingContentPage 
        xmlns="http://xamarin.com/schemas/2014/forms" 
        xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" 
        xmlns:d="http://xamarin.com/schemas/2014/forms/design" 
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:ext="clr-namespace:AppCenterExtensions.XamarinForms;assembly=AppCenterExtensions.XamarinForms"
        mc:Ignorable="d" 
        x:Class="SampleApp.Views.ItemDetailPage" 
        Title="{Binding Title}">
    
        <StackLayout Spacing="20" Padding="15">
            <Label Text="Text:" FontSize="Medium" />
            <Label Text="{Binding Item.Text}" d:Text="Item name" FontSize="Small" />
            <Label Text="Description:" FontSize="Medium" />
            <Label Text="{Binding Item.Description}" d:Text="Item description" FontSize="Small" />
        </StackLayout>
    
    </ext:TrackingContentPage>

    Custom Trace Listener

    This library includes a trace listener implementation that reports to AppCenter. The reason for this is to cater to those who have implemented error handling or reporting using Trace Listeners, these types of users can just swap out (or add on) the AppCenterTraceListener

    This implementation implements the following methods:

    • Write(object obj)
    • Write(object obj, string category)
    • WriteLine(object obj)
    • WriteLine(object obj, string category)

    If the object provided is an Exception then this is reported to AppCenter Crash Reporting. If the object provided is an instance of AnalyticsEvent then this is sent to AppCenter Analytics

    The AnalyticsEvent exposes 2 properties:

    • string EventName { get; } – self explanatory
    • IDictionary<string,string> Properties { get; } – Additional properties to attach to the Analytics event

    To set it up you simply add an instance of AppCenterTraceListener to your existing Trace listeners:

    Trace.Listeners.Add(new AppCenterTraceListener());

    Here’s an example of how to use System.Diagnostics.Trace to report errors

    try
    {
        // Something that blows up
        explosives.Detonate();
    }
    catch (Exception e)
    {
        // Safely handle error then report
        Trace.Write(e);
    
        // or
        Trace.Write(e, "Error");
    
        // or
        Trace.WriteLine(e);
    
        // or
        Trace.WriteLine(e, "Error");
    }

    and here’s an example of to use System.Diagnostics.Trace to send analytics data

    public partial class App : Application
    {
        private const string StateKey = "State";
    
        public App()
        {
            // Some initialization code ...
    
            Trace.Listeners.Add(new AppCenterTraceListener());
        }
    
        protected override void OnStart()
            => Trace.Write(
                new AnalyticsEvent(
                    nameof(Application),
                    new Dictionary<string, string>
                    {
                        { StateKey, nameof(OnStart) }
                    }));
    
        protected override void OnSleep()
            => Trace.Write(
                new AnalyticsEvent(
                    nameof(Application),
                    new Dictionary<string, string>
                    {
                        { StateKey, nameof(OnSleep) }
                    }));
    
        protected override void OnResume()
            => Trace.Write(
                new AnalyticsEvent(
                    nameof(Application),
                    new Dictionary<string, string>
                    {
                        { StateKey, nameof(OnResume) }
                    }));
    }

    Task Extensions

    This library includes a few Task extension methods with AppCenter error reporting in mind. Possible exceptions that occur in the async operation are swallowed and reported to AppCenter. These extension methods will internally wrap the Task in a try/catch and await the Task using ConfigureAwait(false).

    Here are usage some examples

    • Fire and Forget on a Task (Note: Forget() returns void)
    var task = someClass.SomethingAsync()
    task.Forget()
    • Awaitable Task (also available for Task<T>)
    var task = someClass.SomethingAsync()
    await task.WhenErrorReportAsync();

    HTTP Error Logging

    The library provides a HttpMessageHandler implementation that logs non-successfuly HTTP results to AppCenter Analytics. This component will also attach HTTP headers describing the AppCenter SDK Version, Install ID, and a support key to all HTTP requests. The logged failed responses will contain the Endpoint URL (including the HTTP verb), Response status code, how the duration of the HTTP call. This will be logged under the event name HTTP Error

    You will in most (if not all) cases would want to keep a singleton instance of the HttpClient. The DiagnosticDelegatingHandler is designed with unit testing in mind and accepts an IAnalytics and IAppCenterSetup interface, it also accepts an inner HttpMessageHandler if you wish to chain multiple delegating handlers.

    Example:

    var httpClient = new HttpClient(new DiagnosticDelegatingHandler());
    await httpClient.GetAsync("https://entbpr4b9bdpo.x.pipedream.net/");

    In the example above we made an HTTP GET call to the RequestBin endpoint https://entbpr4b9bdpo.x.pipedream.net. This will result in the following we inspected in RequestBin

    AppCenter Crash Report

    AppInsights Extensions

    The library provides an extension method to IServiceCollection called AddAppCenterTelemetry() that should be called from the ConfigureServices(IServiceCollection services) in your ASP.NET Core Startup class. This enables logging the AppCenter diagnostic information described in the previous section to Application Insights

    Here’s an example taken from the Startup class in the sample web project

    public class Startup
    {
        public Startup(IConfiguration configuration)
        {
            Configuration = configuration;
        }
    
        public IConfiguration Configuration { get; }
    
        public void ConfigureServices(IServiceCollection services)
        {
            // Configure and register services to the IoC
    
            services.AddApplicationInsightsTelemetry();
            services.AddAppCenterTelemetry();
        }
    
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
        {
            // Configure app
        }
    }

    Once this is setup, AppCenter diagnostic information should now be searchable and visible in Application Insights. Here’s a screenshot of search results for the x-supportkey header

    and here’s a screenshot of the details of a single request containing AppCenter diagnostic information logged in Application Insights

    With this flow you can now correlate Crash Reports and Analytics data from AppCenter with the HTTP requests for your backend systems in Application Insights. In the systems that I have been involved with building we include the AppCenter diagnostic information from our API Gateway to all calls to our internal Microservices

    For tips and tricks on software development, check out my blog

    If you find this useful and feel a bit generous then feel free to buy me a coffee 🙂

    Visit original content creator repository https://github.com/christianhelle/appcenterextensions
  • Astronaut.Library.js

    Hi!!

    Astronaut Library.js

    A small library with useful resources for developers created by André Malveira.


    License-MIT  Branche Main  Release

    DocumentationExtension PreviewDownloadsSupport


    Library Resources

    Resources to websites or applications that use javascript.

    • Notify -> A custom alert for push notifications.
    • Insert -> Insert css and script to DOM via javascript.
    • Table -> Create tables and insert into html via javascript.
    • CodeViewer -> Custom code highlighting for html.

    Library Extension

    Astronaut Library.js

    Version  Branche Extension  Release


    Localhost in a different way for your development environment!

    Developed entirely in Pure Javascript, the library was primarily created as a browser extension to customize the default “localhost” environment of Apache, Wamp and Xampp servers.

    The extension would just change the default parsing of localhost, but as the process progressed I came up with new ideas that could be useful for application development, like having the project view in the same tab as localhost keeping the list of other projects while side, but of course not only with that, but with other tools.

    Features

    • Project preview in Desktop and Mobile version.
    • Live Server, Real-time update of project changes.
    • Open project in Vscode directly from localhost, it is necessary to add the projects directory in settings.
    • Access database without leaving localhost, configuration is required to access phpmyadmin.
    • Useful Color Palettes.
    • Font Typography.

    ⚠ Warning: The extension is not yet available in browser stores, so the way
    to use it at the moment is to download the .zip, extract and load the extension in developer mode.
    
    ✔ Browser -> Extension -> Enable Developer mode -> Load without compression and select Extension folder 
    

    Browsers Compatibility

    Chrome   Edge   Opera   Firefox   Safari  

    Compatible Servers

    WampServer   Xampp   Mamp   Live%20Server%20VSCode%20Extension  


    License

    This extension is licensed under the MIT License

    External libraries used in this project

    CatalyststuffBootstrap IconsDeviconFont AwesomeLive Server Web ExtensionPrismjs

    Visit original content creator repository https://github.com/andremalveira/Astronaut.Library.js
  • react-form-hooks

    Getting Started with Create React App

    This project was bootstrapped with Create React App.

    Available Scripts

    In the project directory, you can run:

    npm start

    Runs the app in the development mode.
    Open http://localhost:3000 to view it in your browser.

    The page will reload when you make changes.
    You may also see any lint errors in the console.

    npm test

    Launches the test runner in the interactive watch mode.
    See the section about running tests for more information.

    npm run build

    Builds the app for production to the build folder.
    It correctly bundles React in production mode and optimizes the build for the best performance.

    The build is minified and the filenames include the hashes.
    Your app is ready to be deployed!

    See the section about deployment for more information.

    npm run eject

    Note: this is a one-way operation. Once you eject, you can’t go back!

    If you aren’t satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

    Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

    You don’t have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

    Learn More

    You can learn more in the Create React App documentation.

    To learn React, check out the React documentation.

    Code Splitting

    This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting

    Analyzing the Bundle Size

    This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size

    Making a Progressive Web App

    This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app

    Advanced Configuration

    This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration

    Deployment

    This section has moved here: https://facebook.github.io/create-react-app/docs/deployment

    npm run build fails to minify

    This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify

    Visit original content creator repository
    https://github.com/karimkouki-bit/react-form-hooks

  • AyrtonSenna

    MyLinks

    Github Top Language Github Language Count Repository Size

    📋 Sobre o projeto:

    Neste site, você encontrará uma detalhada linha do tempo da carreira de Ayrton Senna, desde seus primeiros anos no kart até sua ascensão meteórica na Fórmula 1. Você poderá mergulhar em momentos icônicos, como suas vitórias em corridas lendárias, batalhas épicas com seus rivais e seus triunfos nos três campeonatos mundiais conquistados em 1988, 1990 e 1991.

    ⚠️ Atenção:
    Este site é uma iniciativa independente criada por fãs de Ayrton Senna e não possui nenhuma afiliação oficial com a família de Senna ou com organizações relacionadas. Todo o conteúdo apresentado neste site é baseado em informações disponíveis publicamente.

    Abaixo podemos ver o resultado final do projeto. Espero que gostem!


    MyLinks

    🔗 Acesse o site com o link abaixo.

    💻 Tecnologias utilizadas

    Este projeto foi desenvolvido com as seguintes tecnologias:

    🚀 Instalando

    Para instalar o projeto, siga estas etapas:

    🖨️ #Clonando o repositório do Github:

    $ git clone https://github.com/degabrielofi/AyrtonSenna
    

    🗃️ #Instalação de packages:

    $ npm i .
    

    ✅ #Inicializar projeto:

    $ npm run start
    

    🤝 Colaboradores

    Agradecemos às seguintes pessoas que contribuíram para este projeto:

    Foto do degabrielofi no GitHub
    Gabriel Silva

    📝 Licença

    Esse projeto está sob licença. Veja o arquivo LICENÇA para mais detalhes.

    Visit original content creator repository https://github.com/degabrielofi/AyrtonSenna
  • codebase

    Reference codebase for Universal-ctags

    This is the reference codebase for measuring the performance of
    Universal-ctags parsers.

    How to run ctags for the code base

    We assume you may have enough storage space on your PC.

    1. Get the input code for a parser for the language you are
      interested in with following command line:

      $ ./codebase clone <LANGUAGE>

      The following command lists available languages:

      $ ./codebase list-languages
      #           LANGUAGE    CODE
                         C    linux
                       C++    qtbase rocksdb
                        Go    buildah kubernetes
                      HTML    cockpit
                JavaScript    cockpit
                  LdScript    linux
                ObjectiveC    gnustep-libs-base

      An example preparing C source code:

      $ ./codebae clone C
      ...
    2. Run Universal-ctags for the cloned code with following command line:

      $ [CTAGS_EXE=${where your ctags executable is}] ./codebase ctags <LANGUAGE> [<PROFILE>]

      codebase refers CTAGS_EXE environment variable to run ctags.
      –ctags ${where your ctags executable is} is an alternative way to
      specify the ctags executable you want to test.

      You can run ctags with different option combination.
      We call such option combination PROFILE.
      The following command is for listing predefined profiles:

      $ ./codebase list-profiles
      
              PROFILE         DESCRIPTION
              maximum0        Enables all extras, fields, and kinds
              minimum0        Disables all fields and extras.

      Results are displayed to your terminal. Tee’ed output goes
      to a file under results/ directory.

      An example command line for running C parser:

      $ cd /home/yamato/hacking/ctags-github; ./autogen.sh; ./configure; make
      $ cd /home/yamato/hacking/codebase
      $ CTAGS_EXE=/home/yamato/hacking/ctags-github/ctags ./codebase ctags C
      version: 2c46f6d4
      features: +wildcards +regex +iconv +option-directory +xpath +json +interactive +sandbox +yaml +aspell +packcc
      log: results/2c46f6d4,C...................,..........,time......,default...,2019-03-18-12:47:20.log
      tagsoutput: /dev/null
      cmdline: + /home/yamato/var/ctags-github/ctags --quiet --options=NONE --sort=no --options=profile.d/maps --totals=yes --languages=C -o - -R code/linux code/php-src code/ruby
      27886 files, 19784832 lines (555082 kB) scanned in 15.1 seconds (36686 kB/s)
      1158391 tags added to tag file
      
      real    0m15.172s
      user    0m14.735s
      sys     0m0.399s
      + set +x

      In the above output, “36686 kB/s” represents the speed of parsing of C parser.
      “1158391 tags” represents the number of tags captured by C parser.

    codebase stores the cloned source code to code directory. The directory is
    repository base. codebase makes another directory, lang, for your convince.
    As the name shows, lang is language bases. You can run ctags directly on
    a directory for the language you are interested in:

    [codebase]$ cd lang
    [codebase/lang]$ ls
    Asm    C++      GDScript  Java        Kconfg    Lua   Markdown  Perl            R      SQL        VHDL
    Basic  CMake    Go        JavaScript  Kotlin    Make  Meson     PHP             RSpec  SystemTap  XSLT
    C      Fortran  HTML      Julia       LdScript  Man   OpenAPI   PuppetManifest  Ruby   Vala       YACC
    [codebase/lang]$ ~/var/ctags-developing/ctags -R JavaScript
    ctags: Warning: ignoring null tag in JavaScript/mediawiki/.svgo.config.js(line: 6)
    ctags: main/entry.c:1454: registerEntry: Assertion `corkIndex != CORK_NIL' failed.
    ctags: main/entry.c:1454: parsing JavaScript/mediawiki/.svgo.config.js:6 as JavaScript
    Aborted (core dumped)

    How to add your code to code base

    You have to write a .lcopy file and put it to lcopy.d directory.
    See lcopy.d/linux.lcopy as an example:

    REPO=https://github.com/torvalds/linux
    ALIGNMENT=v4.20
    LANGUAGES=C,LdScript,Asm,Kconfig,DTS
    

    REPO specifies a git repository. ALIGNMENT is a tag put on the
    git repository. ALIGNMENT allows users of codebase to get the same
    source tree. LANGUAGES is a comma separated language list.

    How to add your profile to preset list

    You have to write a .ctags file and put it to profile.d directory.
    A line started from “# @” is used as a description for the profile.
    You may wan to use –options-maybe to extend profile without
    modifying existing .ctags files.

    Let’s optimize our parsers!
    Masatake YAMATO <yamato@redhat.com>

    Visit original content creator repository
    https://github.com/universal-ctags/codebase

  • your-call-python

    your-call-python

    Raspberry Pi-based audio snippet recording and playback system

    Solution Overview

    This solution is designed as a “phone booth” installation, where visitors can record a short story through a telephone handset, and also play back previous recordings left by earlier visitors.

    The user flow is as follows:

    • User is presented with two buttons: a red button for recording, and a green button for playback and a telephone handset
    • User can press the green button and a random recording is selected from the moderated recordings and played through the USB telephone handset
    • User can then press the red button and record a new story. A prompt will be played (see prompt.wav) providing basic instructions, then a beep signalling the start of recording, and finally when their time is complete, a different beep signifying the end of recording.

    Moderation of Recordings

    There is a moderation process, currently via USB stick:

    New recordings will be saved to the recordings folder on the USB stick.

    Existing recordings for playback will be stored in the moderated folder on the USB stick.

    The moderation process involves removal of the USB stick and manual listening to the stories in recordings, and dragging any approved recordings to the moderated folder.

    Software Setup

    Setting up the platform

    Starting from a fresh Raspbian Stretch installation:

    # install required packages
    sudo apt-get update
    sudo apt-get install git python3-pip alsa-tools
    

    Then clone this repo, then set up python dependencies:

    cd your-call-python
    # install python dependencies
    pip3 install -r pip_versions.txt
    

    Setting up auto-mount of USB drives

    Copy the 11-usb-drive-auto-mount.rules file into /etc/udev/rules.d/

    Reload the udev rules:

    sudo udevadm control --reload-rules
    

    Then the USB drive should mount automatically at ‘/media/usb/’

    [source: https://www.axllent.org/docs/view/auto-mounting-usb-storage/]

    Running this program

    usage: main.py [-h] [-k] [-d D] [-f]
    
    Record and play 1 minute audio
    
    optional arguments:
      -h, --help  show this help message and exit
      -k          use keyboard instead of GPIO
      -d D        recording duration (seconds)
      -f          fake commands - print instead of running aplay/arecord
    

    Setting up this program to run as a service on startup

    Copy/clone this whole your-call-python folder into /usr/local/bin/

    Copy the your-call.sh file into /etc/init.d

    Set up rc.d to run it at startup:

    sudo update-rc.d your-call.sh defaults
    

    [source: http://blog.scphillips.com/posts/2013/07/getting-a-python-script-to-run-in-the-background-as-a-service-on-boot/]

    Hardware Setup

    The project uses two external push buttons for the play and record functions. These are on GPIO channels 24 and 25 respectively, and are pulled down to ground with the Pi’s internal resistors, so no external resistor is required. The following circuit diagram shows the configuration:

    Circuit diagram

    Visit original content creator repository https://github.com/DrewMilloy/your-call-python
  • transmission-add-trackers

    English

    Transmission 辅助脚本,自动添加 Tracker 服务器。

    使用

    $ curl https://raw.githubusercontent.com/qianbinbin/transmission-add-trackers/master/trans-add-trackers.sh -o /path/to/trans-add-trackers.sh
    $ chmod +x /path/to/trans-add-trackers.sh

    编辑脚本,按需修改以下参数:

    # 主机:端口
    # 通常无需修改
    HOST="localhost:9091"
    
    # 用户名:密码
    AUTH="username:password"

    然后运行即可。

    Systemd

    $ curl https://raw.githubusercontent.com/qianbinbin/transmission-add-trackers/master/transmission-add-trackers.service -o /etc/systemd/system/transmission-add-trackers.service

    修改 /etc/systemd/system/transmission-add-trackers.service 中以下参数:

    # 用户
    User=debian-transmission
    # 脚本路径
    ExecStart=/path/to/trans-add-trackers.sh

    执行:

    $ systemctl daemon-reload
    $ systemctl enable transmission-add-trackers.service # 开机启动
    $ systemctl start transmission-add-trackers.service  # 立即启动
    $ systemctl status transmission-add-trackers.service # 查看状态

    已知问题

    感谢

    English

    A shell script for Transmission to add trackers automatically.

    Usage

    $ curl https://raw.githubusercontent.com/qianbinbin/transmission-add-trackers/master/trans-add-trackers.sh -o /path/to/trans-add-trackers.sh
    $ chmod +x /path/to/trans-add-trackers.sh

    Change these values in the script:

    # host:port
    # Usually no need to change
    HOST="localhost:9091"
    
    AUTH="username:password"

    Then run the script.

    Systemd

    $ curl https://raw.githubusercontent.com/qianbinbin/transmission-add-trackers/master/transmission-add-trackers.service -o /etc/systemd/system/transmission-add-trackers.service

    Edit /etc/systemd/system/transmission-add-trackers.service:

    User=debian-transmission
    ExecStart=/path/to/trans-add-trackers.sh

    Then:

    $ systemctl daemon-reload
    $ systemctl enable transmission-add-trackers.service
    $ systemctl start transmission-add-trackers.service
    $ systemctl status transmission-add-trackers.service

    Known issues

    Credits

    Visit original content creator repository
    https://github.com/qianbinbin/transmission-add-trackers

  • teodle

    Teodle – Guess the rank!

    GitHub Pipenv locked Python version Project license Support my work GitHub Repo stars

    Teodle is a Python-powered website for Twitch streamer Teo, to watch game clips submitted by his community and guess the ranks. The livestream viewers can also participate in the game by casting their votes in the Twitch chat. The most accurate viewers are displayed on the leaderboard.

    Ranking System

    The ranking system in Teodle is primarily based on stars, the more stars, the higher the score.

    The rules are simple:

    • If you guess the exact rank of a game clip, you get 2 stars.
    • If you are 1 rank off, you get 1 star.
    • Otherwise, you get no stars.

    Live Participation

    Viewers can play along during livestreams by voting in the chat and competing for both accuracy and speed. The leaderboard showcases the top performing viewers.

    Media

    Screenshots

    YouTube Series

    Updated on 30/08/2023

    Show more

    Deployment

    We recommend using Docker for the best experience.

    Docker

    1. Install Docker
    2. Clone and enter the repository
    git clone https://github.com/Zaczero/teodle && cd teodle
    1. Rename .env.example to .env and configure the environment variables

      1. TTV_TOKEN: Twitch chat access token, get one here.
      2. TTV_USERNAME: Twitch account’s username for the token.
      3. TTV_CHANNEL: Twitch channel to listen the chat on.
    2. Build the image

    docker build . -t teodle
    1. Start the container
    docker run --rm --env-file .env -p 8000:8000 -v $(pwd)/data:/app/data teodle
    
    1. Access the website at http://localhost:8000

    Footer

    Contact me

    https://monicz.dev/#get-in-touch

    Support my work

    https://monicz.dev/#support-my-work

    License

    This project is licensed under the GNU Affero General Public License v3.0.

    The complete license text can be accessed in the repository at LICENSE.

    Visit original content creator repository https://github.com/Zaczero/teodle