Skip to content

Instantly share code, notes, and snippets.

Avatar
🖖
live long and prosper

Ravi Teja cyberpirate92

🖖
live long and prosper
View GitHub Profile
@cyberpirate92
cyberpirate92 / SampleHandler.java
Created Jan 19, 2017
The sample handler code in eclipse PDT
View SampleHandler.java
package my_first_plugin.handlers;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.handlers.HandlerUtil;
import org.eclipse.jface.dialogs.MessageDialog;
/**
View Activator.java
package my_first_plugin;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle
*/
public class Activator extends AbstractUIPlugin {
View SampleHandler.java
package my_first_plugin.handlers;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.console.ConsolePlugin;
import org.eclipse.ui.console.IConsole;
import org.eclipse.ui.console.IConsoleListener;
View temp.java
public void mouseScrolled(MouseEvent arg0) {
if(arg0.count == -3) {
if(!allLinesRead) {
loadLines(traceFileName);
}
}
}
View game.cpp
#include <iostream>
#include <stdio.h>
#include <vector>
using namespace std;
int main() {
int T, n, q, i;
vector< vector<int> > field;
@cyberpirate92
cyberpirate92 / LdapClient.java
Created Mar 22, 2017
Example: How get user info from LDAP
View LdapClient.java
import javax.naming.Context;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
import javax.naming.directory.Attributes;
import javax.naming.directory.SearchControls;
import javax.naming.directory.SearchResult;
import javax.naming.ldap.InitialLdapContext;
import javax.naming.ldap.LdapContext;
import javax.xml.registry.infomodel.User;
import java.io.FileOutputStream;
View descriptor-enumerable.js
var z = {
name: 'Bill',
age: 30
}
Object.keys(z); // ['name', 'age']
Object.defineProperty(z, 'name', { enumerable: false });
Object.keys(z); // ['age']
@cyberpirate92
cyberpirate92 / index.html
Last active Jun 1, 2018
SignalR_LiveGraph
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>SignalR Real time graph</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="//cdn.jsdelivr.net/chartist.js/latest/chartist.min.css">
<script src="//cdn.jsdelivr.net/chartist.js/latest/chartist.min.js"></script>
View NonceFinder.java
import java.util.Base64;
import java.util.Scanner;
import java.util.concurrent.atomic.AtomicInteger;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.nio.charset.StandardCharsets;
public class HashBreaker
{
public static void main(String[] args) throws NoSuchAlgorithmException {
@cyberpirate92
cyberpirate92 / GoogleAnalyticsReportingv4ServiceAccount.cs
Created Oct 5, 2018 — forked from markwemekamp/GoogleAnalyticsReportingv4ServiceAccount.cs
Read data from Google analytics using Google Analytics Reporting v4 and a Service account
View GoogleAnalyticsReportingv4ServiceAccount.cs
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Google.Apis.AnalyticsReporting.v4;
using Google.Apis.AnalyticsReporting.v4.Data;
using Google.Apis.Auth.OAuth2;
using Google.Apis.Services;
namespace Google_api
You can’t perform that action at this time.