This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
name = Pavan Kumar Sunkara | |
email = [email protected] | |
username = pksunkara | |
[init] | |
defaultBranch = master | |
[core] | |
editor = nvim | |
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol | |
pager = delta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- DESCRIPTION -- | |
If you accidentally commit a huge file, you have a problem. Sure, you can remove it from the working tree and commit, | |
but the file is still reachable from your history and therefore causes every clone to be as huge as the commented | |
binary file. | |
Fixing this can be very ugly, time consuming and might not even work as you wish. Luckily, this script can protect | |
you from committing such monsters in the first place. | |
It looks through the staged files (the ones that are added with the "git add"-command) and checks for their file-size. | |
If they are larger then the given size, the commit is aborted and you get a message telling you what file takes so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Add-Path() { | |
[Cmdletbinding()] | |
param([parameter(Mandatory=$True,ValueFromPipeline=$True,Position=0)][String[]]$AddedFolder) | |
# Get the current search path from the environment keys in the registry. | |
$OldPath=(Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).Path | |
# See if a new folder has been supplied. | |
if (!$AddedFolder) { | |
Return 'No Folder Supplied. $ENV:PATH Unchanged' | |
} | |
# See if the new folder exists on the file system. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C.SF ={ | |
LoginURL : 'https://login.salesforce.com/services/oauth2/token', | |
Username : process.env.SF_USERNAME, | |
Password : process.env.SF_PASSWORD, | |
ClientID : process.env.SF_CLIENTID, | |
ClientSecret : process.env.SF_CLIENTSECRET, | |
} | |
var options = { | |
//http://www.salesforce.com/us/developer/docs/api_rest/index_Left.htm#CSHID=quickstart_oauth.htm|StartTopic=Content%2Fquickstart_oauth.htm|SkinName=webhelp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function test(callback){ | |
soap.createClient('./partner.wsdl', function(err, client) { | |
console.log('\t\tLogging in on Salesforce...'); | |
client.login({username: C.SF.Username,password: C.SF.Password},function(err,result,raw){ | |
console.log('\t\tDone.'); | |
if(err){ | |
console.log(error); | |
return callback(error); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited | |
# | |
# Current known FCC address ranges: | |
# https://news.ycombinator.com/item?id=7716915 | |
# | |
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft | |
# | |
# In your nginx.conf: | |
location / { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string url = "https://myurl.com"; | |
string client_id = "client_id"; | |
string client_secret = "client_secret"; | |
//request token | |
var restclient = new RestClient(url); | |
RestRequest request = new RestRequest("request/oauth") {Method = Method.POST}; | |
request.AddHeader("Accept", "application/json"); | |
request.AddHeader("Content-Type", "application/x-www-form-urlencoded"); | |
request.AddParameter("client_id", client_id); | |
request.AddParameter("client_secret", client_secret); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | xargs git branch -d |