Skip to content

Instantly share code, notes, and snippets.

@echo off
NET SESSION >nul 2>&1
IF %ERRORLEVEL% NEQ 0 GOTO ELEVATE >nul
GOTO ADMINTASKS
:ELEVATE
CD /d %~dp0 >nul
MSHTA "javascript: var shell = new ActiveXObject('shell.application'); shell.ShellExecute('%~nx0', '', '', 'runas', 1);close();" >nul
EXIT
@EduVencovsky
EduVencovsky / Auth.jsx
Last active June 27, 2024 07:58
Private Routes with Auth using react-router and Context API
import React, { useState, useEffect } from 'react'
import PropTypes from 'prop-types'
import { checkIsAuthenticated, authSignUp, authLogin, authLogout } from '../../services/auth'
export const AuthContext = React.createContext({})
export default function Auth({ children }) {
const [isAuthenticated, setIsAuthenticated] = useState(false)
const [isLoading, setIsLoading] = useState(true)
@AlexanderWillner
AlexanderWillner / things.sh
Last active September 15, 2023 07:29 — forked from avdgaag/things.sh
Command-line read-only interface to your local Things database of to do items.
Moved to https://github.com/alexanderwillner/things.sh/
@chrismccoy
chrismccoy / restapi.txt
Last active March 30, 2024 08:17
WordPress REST API Resources
Disable REST Api without Plugins
https://rudrastyh.com/wordpress/disable-rest-api.html
Add featured image & alt text to WP REST API
https://allisontarr.com/2021/10/13/add-featured-image-alt-text-to-wp-rest-api/
Allow ALL cross origin requests to WordPress REST API
https://github.com/Shelob9/rest-all-cors
WordPress theme using Rest API and Vue.js
@spivurno
spivurno / gw-gravity-forms-datepicker-kayak-style.css
Last active June 26, 2020 07:04
Gravity Wiz // Gravity Forms // Kayak-style Datepicker
/**
* Gravity Wiz // Gravity Forms // Kayak-style Datepicker
* Style your Gravity Forms Datepickers like Kayak.com
*/
.datepicker-clean.ui-datepicker {
background-color: #fff;
width: 516px !important;
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.1) !important;
padding-left: 20px;
position: relative;
<html>
<head>
<title>Step progress bar</title>
<style type="text/css">
.container {
width: 100%;
}
.progressbar {
counter-reset: step;
}
@debashisbarman
debashisbarman / README.md
Last active February 15, 2024 02:19
A boilerplate Twitter bot that can retweet in response to the tweets matching particluar keyword (https://goo.gl/4whEIt)

Creating a Twitter bot with Node.js

Learn how you can create your own Twitter bot using Node.js and the new Twitter API. The bot will auto retweet in response to tweets with some particular hashtags. (https://goo.gl/4whEIt)

Tools we need

Here are the tools we’ll be using to create the bot — 

  • Node.js installed in your machine
  • A registered Twitter account

Create a Twitter application

@SearchStar
SearchStar / Form.html
Last active January 4, 2024 14:25
Instructions for adding Google AdWords GCLID tracking for the Conversion Upload tool
/* 2. Modify your site’s prospect lead information submission page — usually, a lead submission form — to read the
* GCLID from the cookie and pass it along to your lead management system, along with the lead’s contact information.
* You can retrieve the GCLID value via your choice of client- or server-side languages. Once retrieved, it’s a good
* idea to pass the GCLID through your lead submission form as a hidden field element.
* Here’s an example form with a hidden field for collecting the GCLID. You should insert the highlighted <input>
*/ tag in between your <form> tags.:
<form action="" name="myForm">
Name: <input type="text" name="name">
<input type="hidden" id="gclid" name="gclid" value="">
@craigmdennis
craigmdennis / reset.scss
Last active September 30, 2015 20:56
Reset
// ===================================================
// Reset
// ===================================================
// Adapted from Normalize
// https://github.com/necolas/normalize.css/
// and Eric Meyer's Reset
// http://meyerweb.com/eric/tools/css/reset/
// ===================================================
// It's safe to use box-sizing
@karanrajs
karanrajs / VFRemoteObject.html
Last active September 27, 2017 09:07
A Visualforce page to demonstrate the functionality of Visualforce Remote Objects
<!---
@author : Karanraj
@Description : A Visualforce page to demonstrate the functionality of Remote Objects
-->
<apex:page showHeader="false" standardStylesheets="false">
<!-- Boostrap and jQuery file -->
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" />
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css" />