rails generate migration DropTablename
A file will be created, in the db > migrate folder, make sure it looks like:
| Here's how to make jQuery DataTables work with npm and webpack. DT checks for AMD compatibility first | |
| which breaks when you're using CommonJS with webpack. | |
| Install DT core: npm install datatables.net | |
| Install a DT style: npm install datatables.net-bs (bootstrap) | |
| Install the imports-loader webpack plugin: https://github.com/webpack/imports-loader#disable-amd | |
| Create a loader "exception" just for DT in webpack.config.js: | |
| module: { | |
| loaders: [ |
By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
| var uuid = require('node-uuid'), | |
| https = require('https'); | |
| function iCloud(appleId, password) { | |
| this.urls = { | |
| "version" : "https://www.icloud.com/system/version.json", | |
| "validate": "/setup/ws/1/validate?clientBuildNumber={0}&clientId={1}", | |
| "login": "/setup/ws/1/login?clientBuildNumber={0}&clientId={1}" | |
| } |
| var uuid = require('node-uuid'), | |
| https = require('https'); | |
| function iCloud(appleId, password) { | |
| this.urls = { | |
| "version" : "https://www.icloud.com/system/version.json", | |
| "validate": "/setup/ws/1/validate?clientBuildNumber={0}&clientId={1}", | |
| "login": "/setup/ws/1/login?clientBuildNumber={0}&clientId={1}" | |
| } |
| #!/usr/bin/env python2 | |
| """ | |
| Author: takeshix <[email protected]> | |
| PoC code for CVE-2014-0160. Original PoC by Jared Stafford ([email protected]). | |
| Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP. | |
| """ | |
| import sys,struct,socket | |
| from argparse import ArgumentParser |
| #!/usr/bin/python | |
| # Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford ([email protected]) | |
| # The author disclaims copyright to this source code. | |
| import sys | |
| import struct | |
| import socket | |
| import time | |
| import select |
| # Simple Recommendation Engine in Ruby | |
| # Visit: http://otobrglez.opalab.com | |
| # Author: Oto Brglez <[email protected]> | |
| class Book < Struct.new(:title) | |
| def words | |
| @words ||= self.title.gsub(/[a-zA-Z]{3,}/).map(&:downcase).uniq.sort | |
| end |
| function retry(isDone, next) { | |
| var current_trial = 0, max_retry = 50, interval = 10, is_timeout = false; | |
| var id = window.setInterval( | |
| function() { | |
| if (isDone()) { | |
| window.clearInterval(id); | |
| next(is_timeout); | |
| } | |
| if (current_trial++ > max_retry) { | |
| window.clearInterval(id); |
| // 1. Go to page https://www.linkedin.com/settings/email-frequency | |
| // 2. You may need to login | |
| // 3. Open JS console | |
| // ([How to?](http://webmasters.stackexchange.com/questions/8525/how-to-open-the-javascript-console-in-different-browsers)) | |
| // 4. Copy the following code in and execute | |
| // 5. No more emails | |
| // | |
| // Bookmarklet version: | |
| // http://chengyin.github.io/linkedin-unsubscribed/ |