Skip to content

Instantly share code, notes, and snippets.

View pilinux's full-sized avatar

mahir pilinux

View GitHub Profile
@pilinux
pilinux / bitOperation1.c
Created February 18, 2016 19:41
bit Operation 1
while(1){
PORTB = 0b00000001;
_delay_ms(500);
PORTB = 0b00000010;
_delay_ms(500);
PORTB = 0b00000100;
_delay_ms(500);
PORTB = 0b00001000;
_delay_ms(500);
PORTB = 0b00010000;
@pilinux
pilinux / bitShifting.c
Created February 18, 2016 20:13
bit shifting
// ------- Preamble ------- //
#include <avr/io.h>
#include <util/delay.h> /* Time delay function */
int main(void) {
// ------- Inits ------- //
DDRB = 0b11111111; /* Port-B configured for output */
uint8_t i; /* unsigned 8-bit integer */
@pilinux
pilinux / alert.js
Last active March 10, 2016 21:00
Javascript code snippets
window.alert("Hello World!");
@pilinux
pilinux / pinx.c
Created March 19, 2016 12:40
Sample usage of PINx
/*
* lab7.c
*
* Author : mahir
*/
#include <avr/io.h>
int main(void)
{
@pilinux
pilinux / List_Basic.py
Last active April 5, 2017 09:39
No Description
##########
# L.append(object) -> – append object to the end of list
# append() takes exactly one argument
L = [1,2,3,4,5]
L.append(2.1)
print(L)
# Output:
# [1, 2, 3, 4, 5, 2.1]
##########
# Arithmetic operation
(5 + 2 * 3 + (3 - 1) / 2 + 9) % 2
Out[1]: 1
2**2 # power
Out[2]: 4
4**0.5 # square root
@pilinux
pilinux / README-Template.md
Created July 2, 2017 00:39 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@pilinux
pilinux / uap.sh
Last active October 19, 2018 11:10
Ubuntu - Apache2 - Php7.2 with mbstring + pear + libapache2-mod + curl + cgi
####
# For Ubuntu 18.04
#
# Add the following repos at /etc/apt/sources.list:
# deb http://archive.ubuntu.com/ubuntu bionic main multiverse restricted universe
# deb http://archive.ubuntu.com/ubuntu bionic-security main multiverse restricted universe
# deb http://archive.ubuntu.com/ubuntu bionic-updates main multiverse restricted universe
# and remove the default repos.
####
@pilinux
pilinux / automake1_15.sh
Last active October 19, 2017 07:08
Install automake 1.15
#!/bin/bash
# run as root only
if [ $EUID -ne 0 ]
then
echo -e "\e[1;39m[ \e[31mError\e[39m ] need root access to run this script\e[0;39m"
exit 1
fi
function install_automake() {
@pilinux
pilinux / self-signed-certificate-with-custom-ca.md
Created January 26, 2018 15:02 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096