Skip to content

Instantly share code, notes, and snippets.

View kishaningithub's full-sized avatar

Kishan B kishaningithub

View GitHub Profile
@denji
denji / http-benchmark.md
Last active April 10, 2025 10:01
HTTP(S) Benchmark Tools / Toolkit for testing/debugging HTTP(S) and restAPI (RESTful)
@ajbrown
ajbrown / quartz_jdbc_store.sql
Created December 12, 2013 04:19
The following script creates the schema required to use Postgres as the JDBC store for clustering Quartz. This was tested on Quartz 2.2.1 in Postgres 9.1 and 9.3
CREATE TABLE qrtz_blob_triggers (
trigger_name character varying(80) NOT NULL,
trigger_group character varying(80) NOT NULL,
blob_data text,
sched_name character varying(120) DEFAULT 'TestScheduler'::character varying NOT NULL
);
CREATE TABLE qrtz_calendars (
calendar_name character varying(80) NOT NULL,
calendar text NOT NULL,
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active April 18, 2025 18:08
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@pzurek
pzurek / Twelve_Go_Best_Practices.md
Last active February 22, 2025 14:29
Twelve Go Best Practices
@DavidFrahm
DavidFrahm / AngularJS app config for CORS
Last active December 19, 2015 14:08
CORS configuration for AngularJS is different than jQuery. It requires an extra bit of manual configuration to better conform to the CORS standard for a request. NB: This is only required for some API servers. (The API server is what matters, not the server hosting the AngularJS app.)
myApp.config(['$httpProvider', function($httpProvider) {
/*
* This just helps IE 8/9 with CORS. See https://github.com/angular/angular.js/issues/934
* Use with care - There are side-effects. See why jQuery won't use it at http://bugs.jquery.com/ticket/8283
*/
// $httpProvider.defaults.useXDomain = true;
/*
* The 'X-Requested-With' header indicates AJAX, which is not cross-domain/JSONP,
@mockguiver
mockguiver / gist:5766000
Created June 12, 2013 14:53
Angular JS - $resource - Avoid CORS using JSONP
// Demonstrate how to register services
// In this case it is a simple value service.
angular.module('myBeerApp.services', ['ngResource']).
value('version', '0.1').
factory('beerDB', function($resource) {
return $resource('URL',{
alt:'json',
appToken:'TOKEN',
q:'rock',
callback: 'JSON_CALLBACK'
@willurd
willurd / web-servers.md
Last active April 20, 2025 00:42
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@gr2m
gr2m / convert_dreamcode.js
Last active August 29, 2016 09:01
Imagine you could convert all kind of things to all kind of different things, e.g. taking a screenshot of a dom element or converting another website to a screenshot. Forks & comments much appreciated! #nobackend #dreamcode
// convert a dom element to a PDF and download it
convert( $('.invoice') ).to( 'invoice.pdf' ).download()
// alternatively
download( convert( $('.invoice') ).to( 'invoice.pdf' ) )
// convert another website to a png and show it on the page
convert( 'http://exam.pl/page' ).toImage().then( $('.screenshots').append )
// attach a file to an email
@gr2m
gr2m / store.dreamcode.js
Last active February 23, 2020 00:03
Imagine saving and finding user data would work right in the browser, persistent and synchronised. How would the code look like? This is what I came up with. Forks & comments much appreciated! #nobackend #dreamcode
// add a new object
var type = 'note';
var attributes = {color: 'red'};
store.add(type, attributes)
.done(function (newObject) {});
.fail(function (error) {});
// update an existing object
var type = 'note';
var id = 'abc4567';
@edwardbeckett
edwardbeckett / build.gradle
Created April 13, 2013 06:59
mysema.querydsl gradle
sourceSets {
generated {
java {
srcDirs = ['src/main/generated']
}
}
}
configurations {
querydslapt