Skip to content

Instantly share code, notes, and snippets.

View vermasachin's full-sized avatar
🏠
Working from home

Sachin Verma vermasachin

🏠
Working from home
View GitHub Profile
@vermasachin
vermasachin / reserved_usernames.rb
Created August 1, 2020 08:47 — forked from caseyohara/reserved_usernames.rb
A list of reserved usernames to avoid vanity URL collision with resource paths
# A list of possible usernames to reserve to avoid
# vanity URL collision with resource paths
# It is a merged list of the recommendations from this Quora discussion:
# http://www.quora.com/How-do-sites-prevent-vanity-URLs-from-colliding-with-future-features
# Country TLDs found here:
# http://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains
# Languages found here:
console.log('it works');
@vermasachin
vermasachin / test
Last active December 17, 2019 16:26
This file has been truncated, but you can view the full file.
{
"id": 1,
"question": "Did you hear about the Native American man that drank 200 cups of tea?",
"answer": "He nearly drown in his own tea pee."
},
{
"id": 2,
"question": "What's the best anti diarrheal prescription?",
"answer": "Mycheexarphlexin"
@vermasachin
vermasachin / scraper.py
Created August 3, 2018 18:01
Counts and prints the number of occurrences of alphabets in any web page
from requests import get
from bs4 import BeautifulSoup
import urllib
import string
myurl = "https://sachinverma.net/"
soup = urllib.request.urlopen(myurl)
def clean_me(html):
// General Settings
window.sr = ScrollReveal({ reset: false });
// Custom Settings
sr.reveal('.first', {
origin: 'right',
duration: 1200,
scale: 1,
distance: '200px',
useDelay: 'once',
@vermasachin
vermasachin / scrollReveal
Created October 21, 2017 18:19
scrollReveal.js for Genesis framework.
// Enqueue scrollReveal scripts
function enqueue_scrollreveal_scripts() {
wp_enqueue_script( 'scrollreveal', get_stylesheet_directory_uri() . '/js/scrollreveal.min.js', array( 'jquery' ),'3.3.6',true );
wp_enqueue_script( 'scrollreveal-init', get_stylesheet_directory_uri() . '/js/scrollReveal-init.js', array( 'jquery' ), '1.0.0', true );
}
add_action( 'wp_enqueue_scripts', 'enqueue_scrollreveal_scripts' );
//FPS
fps_max 155
fps_max_menu 169
net_graph 1
//Sensitivity
sensitivity 1.75
//Jump Throw
alias "+jumpthrow" "+jump;-attack"
@vermasachin
vermasachin / functions.php
Last active August 29, 2015 13:57
Fancybox for Genesis Framework
//* Fancybox
/** Load custom stylesheet to header */
add_action('wp_enqueue_scripts', 'load_fancybox_stylesheet');
function load_fancybox_stylesheet() {
if ( !is_front_page() ) {
wp_enqueue_style('load_fancybox_css', CHILD_URL . '/fancybox/source/jquery.fancybox.css', array(), PARENT_THEME_VERSION);
}}
/** Load custom JavaScript * */
@vermasachin
vermasachin / style.css
Last active August 29, 2015 13:56
Responsive Social Share Genesis CSS
/**************
Custom Social Share Buttons
Author: Sachin Verma
Author URL: www.bitdoz.com
***************/
.dashicons {
line-height: inherit !important;
@vermasachin
vermasachin / functions.php
Last active August 29, 2015 13:56
Responsive Social Share Buttons Genesis
/** Add custom social share icons **/
add_action( 'genesis_entry_header', 'single_post_social_share' );
function single_post_social_share() {
if ( is_single() ) { ?>
<div class="social-sharer">
<div class="share-love">
<div class="share-text"><div class="dashicons dashicons-share"></div> Share it!</div>
</div>
<!-- Facebook Share -->
<a href="http://www.facebook.com/share.php?u=<?php print(urlencode(get_permalink())); ?>&title=<?php print(urlencode(the_title())); ?>" target="_blank"><div class="share-facebook"><div class="share-text"><div class="dashicons dashicons-facebook-alt"></div> Share <div class="longtext">on Facebook</div></div></div></a>