Skip to content

Instantly share code, notes, and snippets.

View cyrilchandelier's full-sized avatar

Cyril Chandelier cyrilchandelier

View GitHub Profile
@danielwetan
danielwetan / nodejs-cicd-github-actions.md
Last active April 22, 2024 04:49
Deploy Node.js to VPS using Github Actions

Deploy Node.js to VPS using Github Actions

Steps to deploy Node.js to VPS using PM2 and Github Actions

1. Clone repo to VPS folder

@kurtmilam
kurtmilam / slenderize_flatten_javascript_object_.js
Last active July 31, 2018 19:17
Underscore/Lodash slenderize / flatten object mixin
/* Copyright (C) 2014 Kurt Milam - http://xioup.com | Source: https://gist.github.com/kurtmilam/7006dc1c2123787f9679
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTI
@snikch
snikch / gist:3661188
Created September 6, 2012 23:16
Find the current top view controller for your iOS application
- (UIViewController *)topViewController{
return [self topViewController:[UIApplication sharedApplication].keyWindow.rootViewController];
}
- (UIViewController *)topViewController:(UIViewController *)rootViewController
{
if (rootViewController.presentedViewController == nil) {
return rootViewController;
}
@nick-desteffen
nick-desteffen / OSX UTC Time Zone
Created August 5, 2011 01:50
Set Time zone in OSX to UTC
sudo ln -sf /usr/share/zoneinfo/UTC /etc/localtime