Skip to content

Instantly share code, notes, and snippets.

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

Iacov Colisnicenco IacovColisnicenco

🏠
Working from home
View GitHub Profile
@IacovColisnicenco
IacovColisnicenco / gist:7770023a0f454b3a59d200478ed1c4e7
Created December 28, 2022 06:30
Замыкания в Javascript
const helloGuest = function(nameGuest) {
const dt = new Date();
const hour = dt.getHours();
return function(){
if(hour >= 0 && hour <6 ) {
console.log(`Good Night ${nameGuest}`);
}
else if (hour > 6 && hour < 12) {
@IacovColisnicenco
IacovColisnicenco / gist:f1344d01262945a38e43f42e930120a6
Created November 25, 2022 19:26
Example js object with method
// Online Javascript Editor for free
// Write, Edit and Run your Javascript code using JS Online Compiler
const obj = {
name: 'Iacov',
age: function(yearOfBirth) {
const date = new Date().getFullYear();
const res = date - yearOfBirth;
return console.log(`I'm ${res} years old`);
@bartlomiejdanek
bartlomiejdanek / reinstall_drivers.bash
Created December 19, 2011 16:25
ubuntu - sound cart - reinstall drivers
#!/bin/bash
sudo su
apt-get --purge remove linux-sound-base alsa-base alsa-utils
apt-get install linux-sound-base alsa-base alsa-utils
apt-get install gdm ubuntu-desktop
reboot