Skip to content

Instantly share code, notes, and snippets.

View tibbiyelininja's full-sized avatar
🏠
Working from home

tibbiyelininja

🏠
Working from home
View GitHub Profile
@munierujp
munierujp / echo_middleware_firebase_authentication.go
Last active January 24, 2024 14:47
Echo's middleware for Firebase Authentication
package middleware
import (
"context"
"strings"
"github.com/labstack/echo/v4"
firebase "firebase.google.com/go"
"google.golang.org/api/option"
@crimsonsuv
crimsonsuv / bottom_sheet_fix.dart
Created November 29, 2018 07:02
Flutter Modal bottom sheet whith input fix and full screen sheet
//Flutter Modal Bottom Sheet
//Modified by Suvadeep Das
//Based on https://gist.github.com/andrelsmoraes/9e4af0133bff8960c1feeb0ead7fd749
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:meta/meta.dart';
const Duration _kBottomSheetDuration = const Duration(milliseconds: 200);
@sumnulu
sumnulu / Deck.scala
Last active August 29, 2015 14:10
Dect kata mini tutor
import util.Random
val xs = List("a","b","c","d")
val ys = 1 to 13
//her xs in her ys ni al ve birleştir ve 52 elemanlık desteyi oluştur
val deck = for(x <-xs; y<-ys ) yield x+y
//Sirasiyla:
//1- desteyi rastgele dağıtalım
//2- 13'lü gruplara bölelim
@electronut
electronut / atmega168-power-save.c
Last active October 25, 2022 18:53
Putting the ATmega168 into Power Save mode, and then waking it with a pin-change interrupt.
//**********************************************************************
//
// Putting the ATmega168 into Power Save mode, and then waking it
// with a pin-change interrupt.
//
// electronut.in
//**********************************************************************
/*
build commands on OS X with CrossPack:
/*
* created by Rui Santos, http://randomnerdtutorials.com
* Temperature Sensor Displayed on 4 Digit 7 segment common anode
* 2013
*/
const int digitPins[4] = {
4,5,6,7}; //4 common anode pins of the display
const int clockPin = 11; //74HC595 Pin 11
const int latchPin = 12; //74HC595 Pin 12
const int dataPin = 13; //74HC595 Pin 14
@funkfinger
funkfinger / main.c
Created May 4, 2011 07:23
ATTiny85 3 channel software PWM to drive RGB LED
// based largely on Atmel's AVR136: Low-Jitter Multi-Channel Software PWM Application Note:
// http://www.atmel.com/dyn/resources/prod_documents/doc8020.pdf
#include <avr/io.h>
#include <util/delay.h>
#include <avr/interrupt.h>
#define CHMAX 3 // maximum number of PWM channels
#define PWMDEFAULT 0x00 // default PWM value at start up for all channels
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active July 21, 2024 01:20
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh