Skip to content

Instantly share code, notes, and snippets.

const a = [1,2,3,4,5]
b = a
b[2] = 10
console.log(a)
console.log(b)
@Peelz
Peelz / create-hotspot.md
Created October 24, 2021 09:01 — forked from narate/create-hotspot.md
Create Wi-Fi Hotspot on Linux using nmcli

Create a Wi-Fi hotspot on Linux using nmcli

Original post : https://unix.stackexchange.com/a/310699

nmcli con add type wifi ifname wlan0 con-name Hostspot autoconnect yes ssid Hostspot
nmcli con modify Hostspot 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared
nmcli con modify Hostspot wifi-sec.key-mgmt wpa-psk
nmcli con modify Hostspot wifi-sec.psk "veryveryhardpassword1234"
require("https").globalAgent.options.ca =
require("ssl-root-cas/latest").create();
const mailer = require("nodemailer");
const MAILER_HOST = "";
const MAILER_SECURE = true;
const MAILER_PORT = 465;
const MAILER_AUTH_USER = "";
const MAILER_AUTH_PASS = "";
@Peelz
Peelz / readme.md
Last active April 16, 2021 07:33 — forked from vishnuhd/readme.md
Create Jenkins pipeline using REST api and CURL

Jenkins REST scripts

  • Set variable
export JENKINS_URL=

export COOKIES=
  • Get the config.xml from a pre-created job or create another one according to the need :
# Get version from .xcodeproj
xcodebuild -project "${PROJECTNAME}.xcodeproj" -showBuildSettings | grep "MARKETING_VERSION" | sed 's/[ ]*MARKETING_VERSION = //'
# without ".ssh" directory
cat ~/.ssh/id_rsa.pub | ssh username@server.dreamhost.com "mkdir ~/.ssh; cat >> ~/.ssh/authorized_keys"
# or (alread have ".ssh: directory)
cat ~/.ssh/id_rsa.pub | ssh username@server.dreamhost.com "cat >> ~/.ssh/authorized_keys"
docker rmi $(docker images -qa -f 'dangling=true')
#!/bin/bash
#
# rqworker Manage the rqworker
#
# chkconfig: 2345 96 0
# description: rqworker is a tool for service discovery and configuration
# processname: rqworker
### BEGIN INIT INFO
@Peelz
Peelz / p3.in
Last active April 5, 2020 04:16
5
3
360 480
420 540
600 660
3
0 1440
1 3
2 4
5
def get_current_parentheses(current, previous, next):
before = ""
after = ""
if current == 0:
return "0"
if current == next:
pass
elif current > next:
after = ")" * (current - next)
# else: