Skip to content

Instantly share code, notes, and snippets.

View JasCodes's full-sized avatar
🎯
Focusing

Jaspreet Singh JasCodes

🎯
Focusing
View GitHub Profile
@kdby-io
kdby-io / graphql-typescript-typeorm.ts
Last active July 3, 2018 03:50
An example for graphql-typescript with typeorm
import { Entity, Column, PrimaryGeneratedColumn, getRepository, CreateDateColumn, UpdateDateColumn } from 'typeorm'
import { Type, Field, ID, String, Mutation } from 'graphql-typescript'
class CreateUserArguments {
@Field(String) username: string
@Field(String) password: string
}
@Entity({ name: 'User' })
@Type
@AVGP
AVGP / make-animated-gif.js
Last active August 9, 2023 00:18
Uses three.js, three-software-renderer & omggif to render an animated GIF from a Three.js Scene on the server with node.js
var fs = require('fs'),
omggif = require('omggif'),
THREE = require('three'),
SoftwareRenderer = require('three-software-renderer');
// How many frames and how large shall the GIF be?
var NUM_FRAMES = 200, WIDTH = 500, HEIGHT = 500;
// Our scene, camera and renderer and a box to render
var scene = new THREE.Scene(),
@abayer
abayer / jenkins-git-backup.sh
Last active July 16, 2024 17:17
Example of a script for backing up Jenkins config in git.
#!/bin/bash
#
# Copies certain kinds of known files and directories from a given Jenkins master directory
# into a git repo, removing any old ones, adds 'em, commits 'em, pushes 'em.
#
set -ex
if [ $# -ne 2 ]; then
echo usage: $0 root_dir jenkins_master