Skip to content

Instantly share code, notes, and snippets.

View savaryna's full-sized avatar
🎶
Vibing

Alex Tofan savaryna

🎶
Vibing
View GitHub Profile
@savaryna
savaryna / dedupeChromeBookmarks.js
Created August 11, 2024 11:44
Dedupe chrome bookmarks and cleanup folders
// @ts-check
// Dedupe chrome bookmarks and cleanup folders
// Run only in the extension enviroment
// !WARNING: If you use this script make sure you export all your bookmarks first
(async () => {
const allBookmarks = await chrome.bookmarks.search({});
// Bookmarks
const bookmarks = allBookmarks.filter((b) => Boolean(b.url));
let bookmarksMap = new Map();
@savaryna
savaryna / ExampleApp.js
Last active February 9, 2022 20:16
A simple Material Design ripple effect in React
// Demo: https://jsfiddle.net/ogb6cq7s/96/
// An example App
function App() {
return (
<React.Fragment>
<p>Some buttons</p>
<Button>Button #1</Button>
<Button>Button #3</Button>
<Button>Button #4</Button>
</React.Fragment>
1. npm install --save-dev eslint prettier eslint-plugin-prettier eslint-config-prettier
2. ./node_modules/.bin/eslint --init
// Prettier
{
"arrowParens": "avoid",
"bracketSpacing": true,
#include <conio.h>
#include <stdio.h>
int i,j,tot,n;
struct lucratori{
char nume[20];
char prenume[20];
char functie[20];
char stagiu[20];
char localitate[20];
int salariu;
#include <conio.h>
#include <stdio.h>
#include <string.h>
// Numara cite cuvinte sunt in sir
void main()
{
int c=0;
char str[1024];
char* p;
printf("\nIntroduceti un sir de caractere si apoi apasati Enter\n");
#include <conio.h>
#include <stdio.h>
// Calculeaza produsul elementelor diagonalei secundare ale unei matrici
void main(){
int a[20][20], i, j, n, p;
printf("Dati numarul de linii si coloane a matricei: ");
scanf("%d", &n);
for(i=1; i<=n; i++)
for(j=1; j<=n; j++){
#include <conio.h>
#include <stdio.h>
#include <math.h>
float cateta(float x, float y){
float cat;
printf("Dati marimea ipotenuzei in (cm): ");
scanf("%f", &x);
printf("Dati marimea catetei in (cm): ");
scanf("%f", &y);
cat=sqrt(pow(x,2)-pow(y,2));
#include <conio.h>
#include <stdio.h>
// determina al n-lea numar Fibonacci
void main(){
int n,x,y,z,d;
printf("Introduceti un numar n: ");
scanf("%d",&n);
x=1;
y=1;
#include <conio.h>
#include <stdio.h>
// calculeaza a - b daca a>b si b-a in caz contrar
void main (){
double a,b,s;
printf ("Dati valoarea lui a: ");
scanf("%lf", &a);
printf ("Dati valoarea lui b: ");
scanf("%lf", &b);
@savaryna
savaryna / LAB1.c
Last active September 2, 2019 20:21
#include <conio.h>
#include <stdio.h>
#include <math.h>
// Calculeaza y, cu ajutorul lui math.h
void main (){
double x,y;
printf ("Introduceti un numar real: ");
scanf("%lf", &x);
y=((1/tan(x))+x)/(pow(3,x)-9*x);