Skip to content

Instantly share code, notes, and snippets.

View moziauddin's full-sized avatar
🥇
winning

moziauddin moziauddin

🥇
winning
  • Australia
View GitHub Profile
@moziauddin
moziauddin / wp-forms-custom.css
Created January 24, 2022 22:01
WP-Forms Custom CSS
#wpforms-1900 .wpforms-form {
background-color: #cfe2f3 !important;
padding: 20px 15px !important;
border: 3px solid #666 !important;
border-radius: 20px !important;
}
@moziauddin
moziauddin / jenkins
Created August 31, 2021 03:20
Run jenkins in Tomcat as jenkins User
#!/bin/sh
DESC="Jenkins CI Server"
NAME=jenkins
PIDFILE=/var/run/$NAME.pid
RUN_AS=jenkins
JENKINS_LOGFILE=/opt/jenkins/jenkins-log-2020.log
COMMAND="/opt/jenkins/apps/apache-tomcat-9.0.27/bin/startup.sh"
d_start() {
@moziauddin
moziauddin / titleLinesTextFunction.pde
Created April 22, 2020 08:35
Use new line charater in string and set resizable windows in Processing3
void setup() {
size(800,800);
surface.setTitle("Test Title!");
surface.setResizable(true);
}
void draw() {
background(0);
stroke(255);
textSize(60);
@moziauddin
moziauddin / detectDistance.pde
Created April 22, 2020 04:26
Bullet Collision - Processing
void setup() {
size(400,400);
ellipseMode(CENTER);
}
void draw() {
background(255);
ellipse(mouseX,mouseY, 10,10);
ellipse(width/2, height/2, 100, 100);
line(mouseX, mouseY, width/2, height/2);
@moziauddin
moziauddin / Rotating_Planets.pde
Last active April 15, 2020 09:26
Processing Examples
int sunSize, earthSize, moonSize;
float r;
void setup() {
size(800,800);
sunSize = 200;
earthSize = 100;
r =0.01;
ellipseMode(CENTER);
}
@moziauddin
moziauddin / mouseClickInBounds.pde
Created April 7, 2020 02:58
Processing Mouse Envents
int rectSize = 100;
float rectX ;
float rectY;
void setup() {
size(400,400);
background(250);
rectX = width* 0.4;
rectY = height * 0.4;
}
@moziauddin
moziauddin / curvesExample.pde
Created April 5, 2020 02:22
Processing curves examples
float rate = 2; // Change pow to int and fraction
void setup() {
size(400,400);
}
void draw() {
for(int x = 0; x< width; x++) {
float n = norm(x, 0, width); // Create a Range
float c = n * 255;
int x = 0;
int y = 0;
int rectSize = 20;
int numRect;
int count = 0;
void setup() {
size(200,200);
frameRate(10);
background(240);
noStroke();
@moziauddin
moziauddin / searchReplaceStringResursively.ps1
Last active August 1, 2019 03:42
Powershell Day to Day Usage Commands
$VerNumber = '1.2.16'
# Search recursively
Get-ChildItem -Recurse | Select-String -Pattern "some-string-to-search" | group path | select name
# Replace string value in a file
((Get-Content -Path .\Temp\Template.wxs -Raw) -replace '1.2.15.1', $VerNumber) | Set-Content -Path .\Temp\Template.wxs

db.getProfilingLevel()

0

db.setProfilingLevel(2)

{ "was" : 0, "slowms" : 100, "sampleRate" : 1, "ok" : 1 }

db.getProfilingLevel()