Skip to content

Instantly share code, notes, and snippets.

View indykish's full-sized avatar

Kishorekumar Neelamegam indykish

View GitHub Profile
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
autoprefixer = require('gulp-autoprefixer'),
minifycss = require('gulp-minify-css'),
jshint = require('gulp-jshint'),
uglify = require('gulp-uglify'),
imagemin = require('gulp-imagemin'),
rename = require('gulp-rename'),
clean = require('gulp-clean'),
concat = require('gulp-concat'),
import java.nio.charset.StandardCharsets._
import java.security._
import javax.crypto._
import javax.crypto.spec._
import base64.Encode.{ apply => toBase64 }
import base64.Encode.{ urlSafe => toBase64UrlSafe }
import base64.Decode.{ apply => fromBase64 }
import base64.Decode.{ urlSafe => fromBase64UrlSafe }
@tonyarnold
tonyarnold / import_all.rb
Created March 24, 2014 03:02
Really rough script to copy GitHub issues to GitLab, including scaffolding users with the correct name/username, but dummy emails. Prepare to be spammed by notifications. Current issues include comments not being associated with their proper owner, pull requests aren't properly transferred and wiki page imports have not been tested.
# Community contributed script to import from GitHub to GitLab
# It imports repositories, issues and the wiki's.
# This script is not maintained, please send merge requests to improve it, do not file bugs.
# The issue import might concatenate all comments of an issue into one, if so feel free to fix this.
require 'bundler/setup'
require 'octokit'
require 'optparse'
require 'git'
require 'gitlab'
@jrsmith3
jrsmith3 / pdfmod.py
Created April 3, 2014 03:31
Convert specified pages from a PDF to png
"""
This script was used to create the figures for http://jrsmith3.github.io/sample-logs-the-secret-to-managing-multi-person-projects.html from a PDF file containing some old CMU sample logs.
"""
import PyPDF2
from wand.image import Image
import io
import os
@joecliff
joecliff / cryptojs_wordarray.js
Last active March 16, 2023 20:32
cryptojs WordArray usage
/**
* cryptojs use WordArray (CryptoJS.lib.WordArray) as parameter/result frequently.
* A WordArray object represents an array of 32-bit words. When you pass a string,
* it's automatically converted to a WordArray encoded as UTF-8.
*/
var CryptoJS = require("crypto-js");
// convert String to WordArray
var wordArray = CryptoJS.enc.Utf8.parse('Hello, World!');
require 'httparty'
response= HTTParty.get('http://worldcup.sfg.io/matches')
# I'd recommend creating a little more spacing when declaring your variables
# it'll help for reading & editing the code (see below)
array = response.parsed_response
stadiums_hash = {}
winners_hash = {}
@sangcu
sangcu / build_tool_grunfile
Created August 27, 2014 17:16
This is how I used build tool to develop the app
module.exports = function(grunt) {
grunt.initConfig({
htmlcompressor: {
compile: {
files: {
//'index.min.html': 'index.html',
'views/landing-min/landing.min.html': 'views/landing-default/landing.html',
'views/landing-min/main.min.js': 'views/landing-default/main.min.js'
},
options: {
@hartfordfive
hartfordfive / locust_basic_auth_test.py
Created June 18, 2015 15:55
Sample LocustIO testing script with basic auth
'''
Simple LocustIO testing script with basic auth
'''
import random, gzip, StringIO, threading, urllib2, re, getpass
from locust import HttpLocust, TaskSet, task, web
from random import randint
from urlparse import urlparse
#resource.setrlimit(resource.RLIMIT_NOFILE, (999999, 999999))
USER_AGENTS = [
// Sample event data for a proxy request
// {
// "resource": "Resource path",
// "path": "Path parameter",
// "httpMethod": "Incoming request's method name"
// "headers": {Incoming request headers}
// "queryStringParameters": {query string parameters }
// "pathParameters": {path parameters}
// "stageVariables": {Applicable stage variables}
// "requestContext": {Request context, including authorizer-returned key-value pairs}
@indykish
indykish / megam.torpedo.assembly.json
Last active October 30, 2015 09:46
The declarative directive of megam cloud assembly json which illustrates launch of a virtual machine based on CAMP/TOSCA specification.
{
"id": "ASM1266318644653195264",
"json_claz": "Megam::Assembly",
"name": "injuries",
"components": [],
"tosca_type": "tosca.torpedo.centos",
"policies": [],
"inputs": [
{
"key": "domain",