Skip to content

Instantly share code, notes, and snippets.

Avatar
🥑

Prajwal Tuladhar infynyxx

🥑
View GitHub Profile
@infynyxx
infynyxx / gist:043308fc72dd0bb65217c0860a0bf72a
Created May 18, 2021 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup
View gist:043308fc72dd0bb65217c0860a0bf72a

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 / chrome-new.sh
Last active Feb 14, 2020
Start chrome in stateless mode
View chrome-new.sh
#!/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
View 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')
View SkipList.java
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 / checkstyle.xml
Last active Aug 29, 2015
checkstyle.xml
View checkstyle.xml
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<module name="Checker">
<module name="FileTabCharacter"/>
<module name="NewlineAtEndOfFile" />
<!-- IDE-generated comment -->
<module name="RegexpSingleline">
<property name="format" value="File \| Settings \| File Templates"/>
<property name="message" value="IDE-generated comment"/>
View jmx_datadog_CMS_GC.yaml
--- 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:
View config.json
{
"logging" : {
"appenders" : [ { "type" : "console" } ],
"level" : "INFO",
"loggers" : { "io.dropwizard" : "INFO" }
},
"server" : {
"adminConnectors" : [{ "type" : "http", "port" : 9001 }],
"applicationConnectors" : [{ "type" : "http", "port" : 9000 }]
},
View proc1.rs
let proc_variable = 25i;
let p = proc() {
proc_variable * proc_variable;
};
println!("proc value is {}", p()); //Outout: proc value is ()
View config
[core]
repositoryformatversion = 0
filemode = true
bare = true
ignorecase = true
precomposeunicode = false
[remote "origin"]
fetch = +refs/*:refs/*
mirror = true
url = https://code.google.com/p/guava-libraries/
@infynyxx
infynyxx / erl_tcp.erl
Created Jul 8, 2014
Concurrent erlang server
View erl_tcp.erl
-module(erl_tcp).
-export([start_server/0, connect/1, recv_loop/1]).
-define(LISTEN_PORT, 9000).
-define(TCP_OPTS, [binary, {packet, raw}, {nodelay, true}, {reuseaddr, true}, {active, once}]).
start_server() ->
case gen_tcp:listen(?LISTEN_PORT, ?TCP_OPTS) of
{ok, listen} -> spawn(?MODULE, connect, [listen]),
io:format("~p Server started.~n", [erlang:localtime()]);