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/sh | |
# id: check_unattached_EIPs.sh | |
# author: nicolas david - [email protected] | |
# | |
## version history: | |
# ---------------------------------------------------------------------------- | |
# v1.0 nicolas@ Initial Version | |
# | |
# ---------------------------------------------------------------------------- |
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
const countries = [ | |
{ name:"Åland Islands" ,code:"+358", flag: "🇦🇽" }, | |
{ name:"Albania" ,code:"+355", flag: "🇦🇱" }, | |
{ name:"Algeria" ,code:"+213", flag: "🇩🇿" }, | |
{ name:"American Samoa" ,code:"+1684", flag: "🇦🇸" }, | |
{ name:"Andorra" ,code:"+376", flag: "🇦🇩" }, | |
{ name:"Angola" ,code:"+244", flag: "🇦🇴" }, | |
{ name:"Anguilla" ,code:"+1264", flag: "🇦🇮" }, | |
{ name:"Antigua & Barbuda" ,code:"+1268", flag: "🇦🇬" }, | |
{ name:"Argentina" ,code:"+54", flag: "🇦🇷" }, |
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 boto3 | |
import json | |
# Configure the AWS SDK with your credentials | |
session = boto3.Session( | |
aws_access_key_id='ACCESS_KEY', | |
aws_secret_access_key='ACESS_SECRET_ACCESS_KEY', | |
region_name='eu-west-1' # Replace with your desired region | |
) |
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
kubens | while read line ; do | |
kubectl api-resources --verbs=list --namespaced -o name | xargs -n 1 kubectl get --show-kind --ignore-not-found --namespace $line | |
done |
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
find . -type f -not -path '*/\.*' -exec sed -i -e "s@<base href=\"\/\/www.mydomain.com.\"\/>@\/@" {} \; |
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
package main | |
import ( | |
"fmt" | |
"net/http" | |
"sync" | |
"time" | |
) | |
func ping(w http.ResponseWriter, r *http.Request) { |
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
//you can go to Manage Jenkins > Script Console | |
import jenkins.model.Jenkins | |
import hudson.model.Job | |
MAX_BUILDS = 55 | |
Jenkins.instance.getAllItems(Job.class).each { job -> | |
println job.name | |
def recent = job.builds.limit(MAX_BUILDS) | |
for (build in job.builds) { |
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
let tempTimeStamp = 0; | |
window.addEventListener('scroll', function (event) { | |
if(((event["timeStamp"] - tempTimeStamp) / 1000) < 5){ //how many seconds you rely on. | |
tempTimeStamp = event["timeStamp"]; | |
}else{ | |
console.log(( event["timeStamp"] - tempTimeStamp) / 1000) | |
tempTimeStamp = event["timeStamp"]; | |
//use withinviewport in here. | |
} |
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 | |
namespace App\Models\Campaign; | |
use Illuminate\Database\Eloquent\Model; | |
use App\Classes\Traits\SetModelConnectionToSlave; | |
class CampaignDiscount extends Model | |
{ | |
use SetModelConnectionToSlave { |
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
gitter(){ | |
git add $1 | |
echo "Enter Your Git Commit"; | |
read commitMessage | |
git commit -m "$commitMessage" | |
echo "Enter Your Branch" | |
read branch |
NewerOlder