Skip to content

Instantly share code, notes, and snippets.

View indykish's full-sized avatar

Kishorekumar Neelamegam indykish

View GitHub Profile
@prash-wghats
prash-wghats / Readme_VSCODE_FreeBSD
Last active June 4, 2021 08:21
Notes for Building Electron and VSCode in FreeBSD11
Copy all the files to the build directory.
Copy icudtl.dat to the build directory. (you can find it in the vscode downloads ex for linux).
chromium version in port is 52.0.2743.116.
This was built with FreeBSD 11.0-RELEASE-p1. If building with other versions probably need to change
the freebsd versions in diff files (ex. freebsd11 => freebsd10)
Installed
node => v6.9.1
npm => 3.9.2
>chmod 755 vscode_build.sh
<domain type='kvm'>
<name>ubuntu-4b</name>
<uuid>7dfbcb8a-77da-11e6-a116-408d5cb4b9e6</uuid>
<memory unit='KiB'>12582912</memory>
<currentMemory unit='KiB'>12582912</currentMemory>
<vcpu placement='static'>2</vcpu>
<os>
<type arch='x86_64' machine='pc-q35-2.5'>hvm</type>
<loader readonly='no' type='pflash'>/usr/share/OVMF/OVMF_CODE.fd</loader>
<nvram>/var/lib/libvirt/qemu/nvram/ubuntu-4b_VARS.fd</nvram>
@giovtorres
giovtorres / virt-install-centos
Last active March 15, 2023 09:57
Install CentOS cloud images on KVM using cloud-init
#!/bin/bash
## **Updates to this file are now at https://github.com/giovtorres/kvm-install-vm.**
## **This updated version has more options and less hardcoded variables.**
# Take one argument from the commandline: VM name
if ! [ $# -eq 1 ]; then
echo "Usage: $0 <node-name>"
exit 1
fi
@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",
// 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}
@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 = [
@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: {
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 = {}
@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!');
@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