Skip to content

Instantly share code, notes, and snippets.

View vaporic's full-sized avatar
🏠
Working from home

Hugo Epinosa vaporic

🏠
Working from home
View GitHub Profile
@attila5287
attila5287 / nick-names.csv
Last active May 26, 2021 15:50
list of nick names to upload to database in order to generate random player names along with colorado city names
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
luna
snake-eyes
sugar-boy
wuggle-bear
squishy
turtle
hop
lightning-ball
fruit-cake
gem
@vaporic
vaporic / .editorconfig
Created April 9, 2020 03:51
editorconfig vaporic
root = true
[*]
max_line_length = 100
end_of_line = lf
indent_style = space
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
@nickpoulos
nickpoulos / install_swoole.sh
Created August 16, 2019 21:13
Install Swoole On Laravel Homestead
#!/bin/bash
ini_file=$(php -i | grep "Loaded Configuration File" | awk 'NR==1{print $5}')
php_version_output=$(php -v)
php_version=${php_version_output:4:3}
sudo pecl channel-update pecl.php.net
sudo pecl install swoole
sudo echo "extension=swoole.so" >> $ini_file
sudo service php$php_version-fpm reload
# -*- coding: utf-8 -*-
import json
try:
# For Python 3.0 and later
from urllib.request import urlopen
except ImportError:
# Fall back to Python 2's urllib2
from urllib2 import urlopen
@jgautheron
jgautheron / errorHandler.js
Created May 10, 2017 14:52
Send client errors to the server
import ReactUpdates from 'react-dom/lib/ReactUpdates'
import ReactDefaultBatchingStrategy from 'react-dom/lib/ReactDefaultBatchingStrategy'
import 'isomorphic-fetch'
const logError = (err, extra = {}) => {
fetch('/logger', {
method: 'POST',
credentials: 'same-origin',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
@tzmartin
tzmartin / embedded-file-viewer.md
Last active April 16, 2025 14:36
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

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

@pythoninthegrass
pythoninthegrass / gitkraken.sh
Created August 9, 2016 09:28
Install GitKraken on Fedora 24
#!/bin/bash
# Download GitKraken
wget https://release.gitkraken.com/linux/gitkraken-amd64.tar.gz
# Extract the Kraken
tar -xvzf gitkraken-amd64.tar.gz
# Move the Kraken
@shaik2many
shaik2many / javascript-localstorage-expiry.js
Created July 20, 2016 14:07
set timeout for localStorage or sessionStorage
http://apassant.net/2012/01/16/timeout-for-html5-localstorage/
var hours = 24; // Reset when storage is more than 24hours
var now = new Date().getTime();
var setupTime = localStorage.getItem('setupTime');
if (setupTime == null) {
localStorage.setItem('setupTime', now)
} else {
if(now-setupTime > hours*60*60*1000) {
localStorage.clear()
@noelboss
noelboss / git-deployment.md
Last active April 1, 2025 16:56
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.