Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View infynyxx's full-sized avatar
🫐

Prajwal Tuladhar infynyxx

🫐
View GitHub Profile
#!/bin/bash
#
# MongoDB Backup Script
# VER. 0.1
# Note, this is a lobotomized port of AutoMySQLBackup
# (http://sourceforge.net/projects/automysqlbackup/) for use with
# MongoDB.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@infynyxx
infynyxx / html5_slides.html
Created July 13, 2010 17:28
Presentation Slides in HTML 5
<!DOCTYPE html>
<!--
Copyright 2010 Google Inc.
All rights reserved.
Original slides:
Marcin Wichary
Modifications:
Ernest Delgado
Alex Russell
@infynyxx
infynyxx / supreesion_benchmark.php
Created February 8, 2012 20:27
PHP speed – empty VS isset VS === with error suppression
<?
$myvar = array();
$times = 1000000;
$start = microtime(true);
for($x=0;$x<$times;$x++){
if( @$myvar['test'] === null ) { }
@infynyxx
infynyxx / gist:043308fc72dd0bb65217c0860a0bf72a
Created May 18, 2021 20:45 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@infynyxx
infynyxx / mysql_dump.sh
Created June 11, 2010 16:46
automated mysql dump using Linux Cron tab
#!/bin/sh
mysqldump -u root -pmysql123 –all-databases –routines| gzip > /root/MySQLDB_`date ‘+%m-%d-%Y’`.sql.gz
mysqldump -h 172.16.21.3 -u root -pmysql123 –all-databases –routines | gzip > /root/MySQLDB.3_`date ‘+%m-%d-%Y’`.sql.gz
#now create cron script smth like this
#crontab -e
#30 15 * * * /root/MySQLdump.sh 2>&1>> /root/MySQLdump.log
#The above will dump the database every day at 15:30.
@infynyxx
infynyxx / jmx_datadog_CMS_GC.yaml
Last active May 22, 2020 09:59
Datadog JMX checks
--- Core JMX Metrics when running with Concurrent Mark and Sweep (CMS) GC
instances:
- host: "localhost"
port: 9999
init_config:
conf:
- domain: "java.lang"
bean: "java.lang:type=GarbageCollector,name=ParNew"
attribute:
CollectionTime:
@infynyxx
infynyxx / chrome-new.sh
Last active February 14, 2020 20:04
Start chrome in stateless mode
#!/bin/bash
set -e
# ~/bin/chrome-new
TMPDIR=`mktemp -d /tmp/chrome-XXXXX`
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir=$TMPDIR --no-first-run --autoplay-policy=no-user-gesture-required --no-make-default-browser "$@"
rm -rf $TMPDIR
@infynyxx
infynyxx / capybara cheat sheet
Created August 28, 2018 19:25 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
public class SkipList {
private static class SkipListNode {
private final int value;
private final SkipListNode[] next;
public SkipListNode(int value, int level) {
@infynyxx
infynyxx / suppressions.xml
Created April 3, 2013 17:29
suppressions.xml
<?xml version="1.0"?>
<!DOCTYPE suppressions PUBLIC
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
<suppressions>
<!-- Suppress JavadocPackage in the test packages -->
<suppress checks="JavadocPackage" files="[\\/]test[\\/]"/>
</suppressions>