Skip to content

Instantly share code, notes, and snippets.

View B45i's full-sized avatar
:octocat:

Amal Shajan B45i

:octocat:
View GitHub Profile
@B45i
B45i / build.yml
Created November 13, 2021 15:09
GitHub Action - Build Ionic Capacitor Android app
name: Build Android
on: [push, pull_request]
jobs:
build:
name: Build APK
runs-on: ubuntu-latest
steps:
- name: Checkout source
@B45i
B45i / primes.py
Created May 25, 2018 13:01
Python list containing first 10,000 prime numbers
primes = [ 2, 3, 5, 7, 11, 13, 17, 19, 23, 29,
31, 37, 41, 43, 47, 53, 59, 61, 67, 71,
73, 79, 83, 89, 97, 101, 103, 107, 109, 113,
127, 131, 137, 139, 149, 151, 157, 163, 167, 173,
179, 181, 191, 193, 197, 199, 211, 223, 227, 229,
233, 239, 241, 251, 257, 263, 269, 271, 277, 281,
283, 293, 307, 311, 313, 317, 331, 337, 347, 349,
353, 359, 367, 373, 379, 383, 389, 397, 401, 409,
419, 421, 431, 433, 439, 443, 449, 457, 461, 463,
467, 479, 487, 491, 499, 503, 509, 521, 523, 541,
#include <Servo.h>
#include <Stepper.h>
#define LINE_BUFFER_LENGTH 512
// Servo position for Up and Down
const int penZUp = 80;
const int penZDown = 40;
// Servo on PWM pin 6
#include<stdio.h>
#include <ctype.h>
char s[50];
int top = -1;
push(char elem) {
s[++top] = elem;
}
/*
HackerRank World CodeSprint
Mars Exploration
*/
#include <math.h>
#include <stdio.h>
#include <string.h>
@B45i
B45i / arduino-cli.sh
Last active May 22, 2022 18:06
Arduino-cli initial setup
.cli-config.yml
board_manager:
additional_urls:
- http://arduino.esp8266.com/stable/package_esp8266com_index.json
arduino-cli core update-index
arduino-cli core install esp8266:esp8266
@B45i
B45i / MCU Movies in Chronological Order with Straming Links.md
Last active January 9, 2022 20:39
MCU Movies in Chronological Order with Straming Links
#include <stdio.h>
#include <conio.h>
char str[25];
int i;
void a() {
if(str[i]=='a' && str[i+1]=='b')
i += 2;
//FILE NAME :UDPServer.java
import java.net.*;
public class UDPServer {
public static void main(String[] args) throws Exception{
String messageString;
@B45i
B45i / Tiny_PoV.ino
Last active June 18, 2021 11:56
PoV Display code for ATTiny13
#define DELAY_TIME 2
#define CHAR_BREAK 5
uint8_t leds[] = { 0, 1, 2, 3, 4 };
uint8_t keys[] = { 1, 2, 4, 8, 16 };
void setup() {
for (uint8_t i = 0; i < 5; i++) {
pinMode(leds[i], OUTPUT);
}