Skip to content

Instantly share code, notes, and snippets.

View vickychijwani's full-sized avatar

Vicky Chijwani vickychijwani

View GitHub Profile
@vickychijwani
vickychijwani / Output with PyYAML 3.12
Last active June 27, 2018 10:18
This example (slight modification on this JJB test fixture: https://github.com/openstack-infra/jenkins-job-builder/blob/master/tests/yamlparser/fixtures/complete001.yaml) works with JJB 2.0.10 + PyYAML 3.12, but not with PyYAML 4.1 (released 12 hours ago)
$ jenkins-jobs --flush-cache -l DEBUG --conf ./config.ini test -o /tmp/jjb-test/example . \*
DEBUG:stevedore.extension:found extension EntryPoint.parse('delete = jenkins_jobs.cli.subcommand.delete:DeleteSubCommand')
DEBUG:stevedore.extension:found extension EntryPoint.parse('delete-all = jenkins_jobs.cli.subcommand.delete_all:DeleteAllSubCommand')
DEBUG:stevedore.extension:found extension EntryPoint.parse('get-plugins-info = jenkins_jobs.cli.subcommand.get_plugins_info:GetPluginsInfoSubCommand')
DEBUG:stevedore.extension:found extension EntryPoint.parse('list = jenkins_jobs.cli.subcommand.list:ListSubCommand')
DEBUG:stevedore.extension:found extension EntryPoint.parse('test = jenkins_jobs.cli.subcommand.test:TestSubCommand')
DEBUG:stevedore.extension:found extension EntryPoint.parse('update = jenkins_jobs.cli.subcommand.update:UpdateSubCommand')
INFO:jenkins_jobs.cli.subcommand.update:Updating jobs in ['/tmp/jjb-test', '/tmp/jjb-test/blah', '/tmp/jjb-test/example'] (['*'])
DEBUG:jenkins_jobs.parser:Parsing YA
@vickychijwani
vickychijwani / data.geojson
Last active April 18, 2018 04:42 — forked from awoodruff/index.html
Leaflet: basic #ratmap
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vickychijwani
vickychijwani / game-of-life.md
Last active November 29, 2016 17:09
Conway's Game of Life in Eve

Conway's Game of Life

Data

commit
  [#ticker]

  [#cell x: 1, y: 1, alive: false]
 [#cell x: 2, y: 1, alive: false]
@vickychijwani
vickychijwani / kanban.css
Last active November 30, 2020 21:41
A simple Trello clone in Eve (CSS ripped from Trello itself)
.board {
width: 100%;
height: 100%;
/* background-color: #0079bf; */
display: flex;
flex-direction: column;
}
.board,
.board textarea {
@vickychijwani
vickychijwani / open-source-beginner.md
Last active January 13, 2016 10:17 — forked from nicknisi/open-source-beginner.md
A collection of JavaScript projects with issues labeled beginner-friendly
#! /bin/bash
time1="$(date +%s.%N)"
license="GPL License:
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@vickychijwani
vickychijwani / ghost_api_auth.js
Created August 3, 2015 19:00
An untested example of how to refresh an access token in the Ghost API.
var accessToken;
var refreshToken;
var accessTokenCreatedAt;
var refreshTokenExpiresIn = 24 * 60 * 60; // taken from ghost core
function hasAccessTokenExpired() {
// consider the token as "expired" 5 minutes earlier, to be safe
return new Date().getTime() > accessTokenCreatedAt + authToken.expires_in - 300;
}
@vickychijwani
vickychijwani / BubbleNoteService.java
Created September 8, 2014 11:14
Facebook Rebound example
package com.example.myapp;
import android.app.Service;
import android.content.Intent;
import android.graphics.PixelFormat;
import android.os.IBinder;
import android.util.Log;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.MotionEvent;
@vickychijwani
vickychijwani / ogres-of-hanoi.clj
Last active August 29, 2015 14:01
Recursive solution to Ogres of Hanoi
(defn move [from to]
(.say this "move" (to-array [from to])))
(defn hanoi [num from to via]
(if (= num 1)
(move from to)
(do
(hanoi (dec num) from via to)
(move from to)
(hanoi (dec num) via to from))))
@vickychijwani
vickychijwani / ai-class.py
Created November 12, 2011 10:37 — forked from sumodx/ai-class.py
Download lecture videos of ai-class, with HTTP proxy and basic resume support
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = "Deepak.G.R."
__credits__ = "Sumod Hajela"
__license__ = 'Public Domain'
"""
usage:
Go to command line and type