Skip to content

Instantly share code, notes, and snippets.

🤓
focused

John ⚒ trendy-weshy

🤓
focused
Block or report user

Report or block trendy-weshy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@trendy-weshy
trendy-weshy / world.geojson
Created Jun 18, 2019
my personal helper in maps problem
View world.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@trendy-weshy
trendy-weshy / at-oop-code.py
Created Mar 29, 2019
A pseudo-sample code for python
View at-oop-code.py
class WordFinder:
def __init__(self, doc_contents):
self.content = doc_contents
def search(self, character):
try:
index = self.content.index(character)
return True
View daysInMonth.ts
export const daysInMonth = (month:number, year:number) => new Date(year, month, 0).getDate();
@trendy-weshy
trendy-weshy / media-query.css
Created Dec 5, 2018 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
View media-query.css
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@trendy-weshy
trendy-weshy / class_decorator.ts
Created Oct 13, 2018 — forked from remojansen/class_decorator.ts
TypeScript Decorators Examples
View class_decorator.ts
function logClass(target: any) {
// save a reference to the original constructor
var original = target;
// a utility function to generate instances of a class
function construct(constructor, args) {
var c : any = function () {
return constructor.apply(this, args);
}
@trendy-weshy
trendy-weshy / helper.ts
Created Sep 26, 2018
TypeScript helper functions
View helper.ts
export const paginateRecords = (num, page, items) => {
const isMultiple = (num % 10 !== 0);
const pages = isMultiple ? Math.ceil(num / items) : Math.floor(num / items);
if (num < (page * items)) {
const err: any = new Error();
err.name = 'PaginationError';
err.message = 'The page requested surpasses the number of items per page. No data will be returned';
err.status = 400;
View Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS.md

Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS

This guide will walk you through steps on how to setup a VirtualBox shared folder inside your Ubuntu Server guest. Tested on Ubuntu Server 16.04.3 LTS (Xenial Xerus)

Steps:

  1. Open VirtualBox
  2. Right-click your VM, then click Settings
  3. Go to Shared Folders section
  4. Add a new shared folder
  5. On Add Share prompt, select the Folder Path in your host that you want to be accessible inside your VM.
@trendy-weshy
trendy-weshy / christmas-tree.c
Created Mar 19, 2018
Drawing a chrismas tree in c
View christmas-tree.c
#include <stdio.h>
#include <stdlib.h>
/*
* @author: Elaine
* @date: 6/3/2018
*
*
*/
View load_map_overlay.js
function initMap() {
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 18,
center: {lat: 37.783, lng: -122.403}
});
var bounds = {
17: [[20969, 20970], [50657, 50658]],
18: [[41939, 41940], [101315, 101317]],
19: [[83878, 83881], [202631, 202634]],
@trendy-weshy
trendy-weshy / notes.md
Created Jan 1, 2018 — forked from matthewjberger/notes.md
How to make an electron app using Create-React-App and Electron with Electron-Builder.
View notes.md
You can’t perform that action at this time.