Skip to content

Instantly share code, notes, and snippets.


Sangam Kumar Shrestha 2shrestha22

View GitHub Profile
2shrestha22 / sublime3-build3143.txt
Created Sep 26, 2017
Sublime Text 3 Build 3143 License Key
View sublime3-build3143.txt
200 User License
1D77F72E 390CDD93 4DCBA022 FAF60790
61AA12C0 A37081C5 D0316412 4584D136
94D7F7D4 95BC8C1C 527DA828 560BB037
D1EDDD8C AE7B379F 50C9D69D B35179EF
2FE898C4 8E4277A8 555CE714 E1FB0E43
D5D52613 C3D12E98 BC49967F 7652EED2
View ads-after-each-3rd-paragraph.php
//---------COPY CODE BELOW THIS LINE----------------------------
//Adding adsense ad unit inside the article
//Insert ads after every third paragraph of single post content.
2shrestha22 / cloudflare-worker-edge-cache.js
Last active Apr 17, 2021
Cloudflare workers script to enable edge-cache. Use Official cloudflare wordpress pulgin for auto cache purge management
View cloudflare-worker-edge-cache.js
// Stop CF edge from caching your site when specific wordpress cookies are present
// script found in
addEventListener('fetch', event => {
async function noCacheOnCookie(request) {
// Determine which group this request is in.
const cookie = request.headers.get('Cookie')
View repeatingAdInsideListview.dart
//where _kAdIndex is an int and after each -kAdIndex in the listView Ad is displayed
controller: _scrollController,
cacheExtent: 20,
itemCount: data.layoutList.length +
(data.layoutList.length ~/ _kAdIndex),
itemBuilder: (BuildContext context, int index) {
if (index != 0 && (index + 1) % (_kAdIndex + 1) == 0) {
View regular_expressions.dart
class RegX {
static final RegExp _emailRegExp = RegExp(
static final RegExp _nonDigitsExp = RegExp(r'[^\d]');
static final RegExp _anyLetter = RegExp(r'[A-Za-z]');
static final RegExp _phoneRegExp = RegExp(r'^\d{7,15}$');
static final RegExp _ipv4RegExp = RegExp(
static final RegExp _ipv6RegExp = RegExp(
View freezed_snippet.code-snippets
// by ResoCoder
"Part statement": {
"prefix": "pts",
"body": [
"part '${TM_FILENAME_BASE}.g.dart';",
"description": "Creates a filled-in part statement"
View generatepress-sangams-blog-additional-css.css
#right-sidebar {
position: -webkit-sticky;
position: sticky;
top: 0;
.site-header, .inside-article,.sidebar .widget, .comments-area, .paging-navigation, .my-ad, .wp-block-image {
-webkit-box-shadow: 5px 5px 30px -10px rgba(46,46,46,0.5);
-moz-box-shadow: 5px 5px 30px -10px rgba(46,46,46,0.5);
View apache-virtualhosts.conf
#modify necessary
<VirtualHost *:80>
DocumentRoot "D:/xampp/htdocs/"
ServerName localhost
#we add this to make sure we can access to open PHPmyAdmin from http://localhost/phpmyadmin
#DocumentRoot - the root of the web server in your machine. In XAMPP it is ../xampp/htdocs/
<VirtualHost *:80>
2shrestha22 / spfooter.php
Last active Apr 6, 2020
Removes Spacious Footer Credits With Your Own
View spfooter.php
//copy below this line, you shouldn't include <?php
//paste this code in your function.php
//spacious footer
if (! function_exists('spacious_custom_credits')) {
function remove_default_credits(){
View ads-inside-content-1.php
//adding adsense ad unit inside the article
//Insert ads after second paragraph of single post content.
add_filter( 'the_content', 'prefix_insert_post_ads' );
function prefix_insert_post_ads( $content ) {
$ad_code1 = '<script async src=""></script>