Skip to content

Instantly share code, notes, and snippets.

View andyfaizan's full-sized avatar
🎮
Focusing

Ainuddin Faizan andyfaizan

🎮
Focusing
View GitHub Profile
@andyfaizan
andyfaizan / push_secrets.sh
Created September 23, 2024 10:41
Bash script to read an env file and push all secrets to github repo secrets to use in github actions
#!/bin/bash
# Ensure gh CLI is installed
if ! command -v gh &>/dev/null; then
echo "Error: GitHub CLI (gh) is not installed."
exit 1
fi
# Load GitHub configuration from .github.env
GITHUB_ENV_FILE=".github.env"
// Parent.jsx
class Parent extends React.Component {
constructor() {
super();
console.log("Parent constructor"); // 1
}
componentDidMount() {
console.log("Parent CDM"); // 2
}
render() {
import React, { Component } from 'react';
import { Row, Button } from 'reactstrap';
//files
import './help.css';
import Close from '../../img/icons/close_orange.svg';
import Arrow from '../../img/icons/hilfe_arrow.svg';
class help extends Component {
constructor(props) {
if (window.innerWidth < 1025) {
this.setState({
isBelow1025: true,
})
} else {
this.setState({
isBelow1025: false,
})
}
@andyfaizan
andyfaizan / Newsletter.js
Created November 26, 2018 20:32
No formatting..look at line 20. Even if we ignore the long text, there are other elements being added at the end which should be on the next line
import React, { Component } from "react";
import { Link } from 'react-router-dom';
import { Field, reduxForm } from "redux-form";
import { customInput } from "./fields";
import { required, email } from "../validation";
import "./RegisterForm.css";
class Newsletter extends Component {
render() {
const { handleSubmit, isButtonActive, buttonText } = this.props;
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import '../App.css';
//media
import Close from './../img/icons/close_orange.svg';
export default class Oems extends Component {
componentDidMount() {