Skip to content

Instantly share code, notes, and snippets.

View nasirhm's full-sized avatar
😀
404 Not Found

Nasir Hussain nasirhm

😀
404 Not Found
View GitHub Profile
@nasirhm
nasirhm / btrfs-nixos-install.sh
Last active August 24, 2023 08:55 — forked from alcol80/btrfs-nixos-install.sh
nixos install (boot + btrfs root + LUKS setup)
mkfs.vfat -n BOOT /dev/sda3
mkfs.btrfs -L root /dev/sda1
cryptsetup luksFormat /dev/sda1
# Enter the Password.
cryptsetup luksOpen /dev/sda1 enc-pv
# After Opening the Disk, Open Gparted and Format /dev/sda1 to btrfs for the btrfs logic block.

Keybase proof

I hereby claim:

  • I am nasirhm on github.
  • I am nasirhm (https://keybase.io/nasirhm) on keybase.
  • I have a public key ASCEEnAY_ClM4zALAb9qPyzFPSdDtnC1yUYsNcnrw2shugo

To claim this, I am signing this object:

`var currentTime = new Date().getTime();
while(currentTime + 4500 >= new Date().getTime()){
agent.add(new Card({All Params}))
}
agent.setFollowupEvent('Delay1')
agent.add("Now Working")`
@nasirhm
nasirhm / gist:1dd2ad31e585b350b7a82b6c36a67cec
Created March 17, 2020 13:11
CloudFunctionDialogflowError
async function someFunction(agent) {
try {
let result_a;
let result_b = [];
let param1 = agent.parameters.from; // From Dialgflow
let param2 = agent.parameters.to; //From Dialogflow
let param3 = agent.parameters.on; // From Dialogflow
let myBody = {
---
- name: Installing Jenkins by Ansible automation
hosts: codein_fedora_boxes
tasks:
- name: Downloading Jenkins from yum repo
get_url:
url: "https://pkg.jenkins.io/redhat-stable/jenkins.repo"
dest: /etc/yum.repos.d/jenkins.repo
become: true
---
- name: Installing Jenkins by Ansible automation
hosts: localhost
tasks:
- name: Installing Java 8
yum:
name: "java-1.8.0-openjdk"
state: present
become: true
- name: Correcting the Alternative to Change Default Java
---
- name: First Playbook for CodeIn
hosts: codein_fedora_boxes
tasks:
- name: Display
debug:
msg: "My Name is Nasir Hussain, It's First Ansible task and It's awesome"
#Remember to add codein_fedora_boxes or any type of host on your ansible hosts file located : /etc/ansible/hosts use nano to edit
@nasirhm
nasirhm / modern_js.md
Created February 11, 2019 17:29 — forked from gaearon/modern_js.md
Modern JavaScript in React Documentation

If you haven’t worked with JavaScript in the last few years, these three points should give you enough knowledge to feel comfortable reading the React documentation:

  • We define variables with let and const statements. For the purposes of the React documentation, you can consider them equivalent to var.
  • We use the class keyword to define JavaScript classes. There are two things worth remembering about them. Firstly, unlike with objects, you don't need to put commas between class method definitions. Secondly, unlike many other languages with classes, in JavaScript the value of this in a method [depends on how it is called](https://developer.mozilla.org/en-US/docs/Web/Jav
@nasirhm
nasirhm / simpleScraper.js
Created February 1, 2019 14:27
Medium Article about Web Scraping
const rp = require('request-promise');
const cheer = require('cheerio');
const url = 'https://en.wikipedia.org/wiki/List_of_Presidents_of_the_United_States';
rp(url)
.then(function(data){
//Filtering Tags - Length one is to check there isn't additional Data Coming
console.log(cheer('big > a',data.length));
console.log(cheer('big > a',data))

Q.1

The speed limit of Shahrah-e-Faisal is 60 km/hr. Write a program that, given a car's speed, tells whether it is Overspeeding or not.


Q.2

Your task is to develop a mini-facebook. If the user is logged in, it should print Welcome, <user's name>, otherwise it should print Please log in to continue!