var state = {
id: 1,
points: 100,
name: "Goran"
};
var newState = {
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Quick and easy one line command to setup a global .gitignore file and ignore macOS .DS_store files globally | |
git config --global core.excludesfile "~/.gitignore" && echo .DS_Store >> ~/.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Below is a full tutorial on how to setup and use Googles Firebase push notification API for both Android and iOS. It is based on this | |
earlier implementation of Googles GCM method: https://gist.github.com/prime31/5675017 - FCM is the new method and GCM will eventually be | |
retired. | |
## THE BELOW METHOD IS THE NEWER FCM METHOD: | |
Register your app in the FCM Console: https://console.firebase.google.com (add project) | |
1. Click on the newly added project, in the upper left menu is the "Overview" and Gear Settings. | |
2. Click on the GEAR settings icon, and then on "Project Settings" | |
3. In the main screen, click on "Cloud Messaging" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Run this in the F12 javascript console in chrome | |
// if a redirect happens, the page will pause | |
// this helps because chrome's network tab's | |
// "preserve log" seems to technically preserve the log | |
// but you can't actually LOOK at it... | |
// also the "replay xhr" feature does not work after reload | |
// even if you "preserve log". | |
window.addEventListener("beforeunload", function() { debugger; }, false) |
Spent a couple minutes poking around at kanban-like alternatives/supplements to labeling:
GitHub uses this and Huboard internally for some projects. Supported by Rally, so probably not going away anytime soon.
GitHub uses this and Waffle internally for some projects.
Looks interesting. (Marking issues from the command-line? Sweet!) It's also pricey.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Example code for exporting data in a table to a csv file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
#### | |
## Eliminar una imagen | |
#### | |
if(isset($_GET['eliminar'])){ | |
$archivo = $_GET['eliminar']; | |
$directorio = dirname(__FILE__); | |
if(unlink($directorio.'/'.$archivo)){ | |
header("Location: cargarImagen.php?accion=eliminado"); |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: