Skip to content

Instantly share code, notes, and snippets.

View asilverstein's full-sized avatar

Alex T. Silverstein asilverstein

View GitHub Profile
@lmcneel
lmcneel / remove-node-modules.md
Last active April 21, 2024 19:39
How to remove node_modules after they have been added to a repo

How to remove node_modules

Create a .gitignore file

  1. Check for an existing .gitignore file in the project directory
ls -a
@tzmartin
tzmartin / embedded-file-viewer.md
Last active May 1, 2024 14:41
Embedded File Viewer: Google Drive, OneDrive

Office Web Apps Viewer

('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')

http://view.officeapps.live.com/op/view.aspx?src=[OFFICE_FILE_URL]

<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>
</iframe>

OneDrive Embed Links

@glarrain
glarrain / supervisor
Created August 6, 2013 16:14
logrotate.d/supervisor: config file for logrotate for Supervisor logs (includes explanation of each directive)
/var/log/supervisor/*.log {
weekly
rotate 52
compress
delaycompress
notifempty
missingok
copytruncate
}
@msurguy
msurguy / upload.php
Created April 18, 2013 17:54
Automatic image rotation from mobile Recently I had a use case when I needed to automatically rotate uploaded pictures according to the sensor data embedded in the image (think iPhone, iPad, Android phones, DSLR cameras, etc) I ended up using PHP Imageworkshop (http://phpimageworkshop.com/documentation.html) for all my image processing needs so …
//retrieve the image
$image = Input::file('image');
// initialize imageworkshop layer
$layer = PHPImageWorkshop\ImageWorkshop::initFromPath($image['tmp_name']);
if (File::is('jpg', $image['tmp_name']))
{
$exif = exif_read_data($image['tmp_name']);