This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python | |
import math | |
import os | |
import random | |
import re | |
import sys | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:convert'; | |
import 'package:firebase_core/firebase_core.dart'; | |
import 'package:firebase_messaging/firebase_messaging.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:clevertap_plugin/clevertap_plugin.dart'; | |
void main() async { | |
WidgetsFlutterBinding.ensureInitialized(); | |
await Firebase.initializeApp(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM jenkins/jenkins | |
USER root | |
RUN mkdir -p /tmp/download && \ | |
curl -L https://download.docker.com/linux/static/stable/x86_64/docker-docker-18.06.3-ce.tgz | tar -xz -C /tmp/download && \ | |
rm -rf /tmp/download/docker/dockerd && \ | |
mv /tmp/download/docker/docker* /usr/local/bin/ && \ | |
rm -rf /tmp/download && \ | |
groupadd -g 999 docker && \ | |
usermod -aG staff,docker jenkins |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$image = $_POST['image']; | |
$key = trim(shell_exec('sudo -u service_name gcloud auth application-default print-access-token 2<&1')); // replace service_name with your service account name | |
$post='{"payload":{"image":{"imageBytes": "'.$image.'"}}}'; | |
$curl = curl_init(); | |
// The REST API URL can be found from the predict tab example replace with your account URL https://automl.googleapis.com/v1beta1/projects/quizappflutter/locations/us-central1/models/ICNXXXXXXXXXX41:predict | |
curl_setopt_array($curl, array( | |
CURLOPT_URL => "https://automl.googleapis.com/v1beta1/projects/quizappflutter/locations/us-central1/models/ICNXXXXXXXXXX41:predict", | |
CURLOPT_RETURNTRANSFER => true, | |
CURLOPT_ENCODING => "", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysqldump -h RDS instance endpoint \ | |
-u user \ | |
-p password \ | |
--port=3306 \ | |
--single-transaction \ | |
--routines \ | |
--triggers \ | |
--databases database database2 > path/rds-dump.sql | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create archive create verbose file | |
tar cvf output_tar_file.tar /home/epynic/ | |
# tar.gz | |
tar cvzf output_tar_file.tar /home/epynic/ | |
# tar.bz2 | |
tar cvfj output_tar_file.tar /home/epynic/ | |
# Untar - current directory - works for tar, gz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ls /usr/bin | grep zip # list all zip files | |
ls /usr/bin | grep -c zip # list all zip files count | |
ls /usr/bin | grep -v zip # list all !zip files = not containing the pattern | |
ls /usr/bin | grep -n zip # list all zip files - frints the line:file | |
grep -i linux file_name.txt #find in files ignore case |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#debugging shellscripts -x would show the scrips line by line and output followed by | |
#!/bin/bash -x | |
TEST_VAR="test" | |
echo "$TEST_VAR" | |
#custom | |
#set -x / start debugginh | |
#set +x / stop | |
#-ex exit on stop | |
#-v prints shell before substitution are applied | |
#-vx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$config['total_rows'] = 100; | |
$config['per_page'] = 20; | |
$config['num_tag_open'] = '<li class="page-item">'; | |
$config['num_tag_close'] = '</li>'; | |
$config['cur_tag_open'] = '<li class="page-item active"> <span class="page-link">'; | |
$config['cur_tag_close'] = '</span> </li>'; | |
$config['attributes'] = array('class' => 'page-link'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LIVE AT | |
http://epynic.asia/vacation/1.php | |
http://epynic.asia/vacation/2.php | |
<form action="1.php" method="post"> | |
<input type ="text" name="number" placeholder="Enter Number !" > | |
<button type="submit" class="btn">Submit</button> | |
</form> | |
<?php |