Skip to content

Instantly share code, notes, and snippets.

View gauravcanon's full-sized avatar
♦️
Beign prodcutive

Gaurav Dubey gauravcanon

♦️
Beign prodcutive
View GitHub Profile
@DTrejo
DTrejo / top3stories.js
Created January 21, 2011 22:41
Gets top three articles from frontpage and newpage of Hacker News. Blog post on scraping: http://blog.dtrejo.com/scraping-made-easy-with-jquery-and-selectorga
// Scraping Made Easy with jQuery and SelectorGadget
// (http://blog.dtrejo.com/scraping-made-easy-with-jquery-and-selectorga)
// by David Trejo
//
// Install node.js and npm:
// http://joyeur.com/2010/12/10/installing-node-and-npm/
// Then run
// npm install jsdom jquery http-agent
// node numresults.js
//
@odan
odan / xampp_php7_xdebug.md
Last active June 28, 2024 12:58
Installing Xdebug for XAMPP
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@awesomebytes
awesomebytes / .bashrc
Last active April 12, 2021 01:23
Example bashrc that adds some colors and useful shortcut commands
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@ricardopereira
ricardopereira / Fastfile-example
Last active March 29, 2020 09:00
Automate some iOS development processes with Fastlane
fastlane_version "1.99.0"
REQUIRED_XCODE_VERSION = "7.3.1"
default_platform :ios
platform :ios do
before_all do |lane, options|
ENV["SLACK_URL"] = "https://hooks.slack.com/services/???"
end
@Painezor
Painezor / Checks.py
Last active April 18, 2024 05:22
Built-in Checks for the commands extension of discord py
@commands.guild_only()
# Command cannot be used in private messages.
@commands.dm_only()
# Command can only be used in private messages.
@commands.is_owner()
# Command can only be used by the bot owner.
@commands.is_nsfw()
@coinsandsteeldev
coinsandsteeldev / dialog.html
Last active July 19, 2024 05:46 — forked from arthurattwell/dialog.html
Google Sheets script to allow multi-select in cells with data-validation (adapted from https://www.youtube.com/watch?v=dm4z9l26O0I)
<!DOCTYPE html>
<html>
<head>
<script>
var data
var formId = 'form'
function drawForm() {
if (!data) return
var outputEl = document.getElementById(formId);
@lokeshjawane
lokeshjawane / S3-to-GCS.js
Created September 25, 2018 12:43
Script to sync s3 obj to GCS in realtime
//This script is to copy S3 object to GCS in asynchronously using Lambda function
//set var "gcp_proj_id" with value of you GCP project ID
//set var "gcp_client_email" with value of your client email address from JSON key file & make sure that user has GCS create object permission
//set var "cred_bucket", here provode a s3 bucket from where lambsa will fetch the JSON creds file to GCP auth
//Set vat "cred_s3_obj", here you provide a json keyfile name which is uploaded in "cred_bucket" s23 bucket
//**NOTE**: set HOME env var with value "/tmp" in lambda function, because google-cloud/storage create file locally & in lambda only /tmp is writable. Run lambda function on S3 create object event based.
//
'use strict';
@rise-worlds
rise-worlds / For Mac 4.2.6 unlimited trial.md
Last active July 21, 2024 07:54 — forked from satish-setty/trial.md
Beyond Compare 4 license for Windows, Mac, Linux

for 4.2.4 or higher, 4.2.5,4.2.6,4.3.7, it's works, this is the way which makes Always in evaluation mode.

  1. open Terminal, go to the dir : cd /Applications/Beyond Compare.app/Contents/MacOS
  2. change the name BCompare to BCompare.bak: mv BCompare BCompare.bak
  3. touch a file name BCompare , and chmod a+ux BCompare : touch BCompare && chmod a+ux BCompare
  4. open BCompare with text editor, insert the script :
#!/bin/bash
rm "/Users/$(whoami)/Library/Application Support/Beyond Compare/registry.dat"
"`dirname "$0"`"/BCompare.bak $@
@wesolowski
wesolowski / agent-wget-install.sh
Last active December 29, 2021 08:28
TeamCity docker-compose (Docker in Docker)
docker exec teamcity_agent1 /bin/sh -c 'apt-get update && apt-get install -y wget docker-compose unzip'
docker exec teamcity_agent2 /bin/sh -c 'apt-get update && apt-get install -y wget docker-compose unzip'
docker exec teamcity_agent3 /bin/sh -c 'apt-get update && apt-get install -y wget docker-compose unzip'