Skip to content

Instantly share code, notes, and snippets.

View cloaked-ninja's full-sized avatar

btcNinja cloaked-ninja

  • working on it ;)
  • nexus
View GitHub Profile
@cloaked-ninja
cloaked-ninja / patched-install.js
Created December 24, 2019 20:57
Get around Node.js / node-gyp errors. After trying everything I could think of, I came across this snippet and wanted to share it. Taken from https://github.com/nodejs/help/issues/979#issuecomment-367827997
/*This problem is caused by the download function in the install.js file for node-gyp.
WORKAROUND: To force node-gyp to ignore self-signed certificate, you need to modify the download function so that the requestOpts Object includes the following variable:
rejectUnauthorized: false
The install.js file can be found here:
%APPDATA%\npm\node_modules\npm\node_modules\node-gyp\lib\install.js
@cloaked-ninja
cloaked-ninja / gist:866585135d8bfa5b4e7c55f481602165
Created December 19, 2019 03:44 — forked from vmassol/gist:7773408
JIRA Groovy Script to update Filters
import com.atlassian.jira.ComponentManager
import com.atlassian.jira.bc.filter.SearchRequestService
import com.atlassian.jira.bc.JiraServiceContext
import com.atlassian.query.*
import com.atlassian.jira.bc.JiraServiceContextImpl
def cm = ComponentManager.getInstance()
def searchRequestService = cm.getSearchRequestService()
def authenticationContext = cm.getJiraAuthenticationContext()
def searchService = cm.getSearchService()
<div id='calendar'></div>
@cloaked-ninja
cloaked-ninja / hide_linkedin_ads.txt
Last active March 31, 2018 08:35 — forked from jhult/hide_linkedin_ads.txt
Hide LinkedIn Ads - Adblock Filters
! Ad Banner
linkedin.com##.ad-banner-container
! Navigation - Try Premium for Free
linkedin.com##.nav-item__try-premium
! Homepage Feed - Like article / Like and comment
linkedin.com##LI.member-comment-share
linkedin.com##LI.member-like-share
linkedin.com##LI.member-like-poncho-post
@cloaked-ninja
cloaked-ninja / loadCurrentUserInfo
Created March 1, 2017 18:34
Get User Info for SharePoint form
// Auto Load current user login (SharePoint 2010), then fills out form with user
// used in SharePoint forms program but most of code should work outside of this program
// fd.field variables are specific to SP forms.
// SP Forms : http://spform.com/
SP.SOD.executeOrDelayUntilScriptLoaded((function () {
var ctx = new SP.ClientContext.get_current();
var web = ctx.get_web();
ctx.load(web);
var user = web.get_currentUser();
@cloaked-ninja
cloaked-ninja / VFRemoteObject.html
Created February 7, 2017 22:18 — forked from karanrajs/VFRemoteObject.html
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" />
@cloaked-ninja
cloaked-ninja / VFRemoteObject.html
Created February 7, 2017 22:18 — forked from karanrajs/VFRemoteObject.html
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" />
@cloaked-ninja
cloaked-ninja / ipak.R
Created February 2, 2017 22:50 — forked from stevenworthington/ipak.R
Install and load multiple R packages at once
# ipak function: install and load multiple R packages.
# check to see if packages are installed. Install them if they are not, then load them into the R session.
ipak <- function(pkg){
new.pkg <- pkg[!(pkg %in% installed.packages()[, "Package"])]
if (length(new.pkg))
install.packages(new.pkg, dependencies = TRUE)
sapply(pkg, require, character.only = TRUE)
}
@cloaked-ninja
cloaked-ninja / README.md
Created January 30, 2017 14:21 — forked from ajur/README.md
D3.js exaple template

Basic template for D3 example. Ready for usage with bl.ocks.org.

@cloaked-ninja
cloaked-ninja / js-stop-edit.js
Created October 28, 2016 14:39
javascript stopfield edit
1. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js"    
2.        type="text/javascript"></script>    
3.      
4. <script type="text/javascript">    
5.      
6. $(document).ready(function()    
7. {    
8. //Set the Field to Read only and change its background colour    
9. $("input[title='FieldName']").attr("readonly","true").css('background-color','#F6F6F6');    
10.