Skip to content

Instantly share code, notes, and snippets.

View Adetona's full-sized avatar
🎯
Focusing

Abiodun Adetona

🎯
Focusing
View GitHub Profile
@mykeels
mykeels / PoliceNG.yaml
Last active December 10, 2019 09:55
The Nigerian Police Emergency Numbers
--- !https://twitter.com/PoliceNG/status/1204006677990821888?s=19
states:
- state : abia
phones:
- '0803541540'
- '08079210003'
- '08079210004'
- '08079210005'
- state : adamawa
phones:
@bitgord
bitgord / Create-Bitcoin-Address-NodeJS-BitcoinJS
Last active March 17, 2020 20:01
Create a bitcoin address with Nodejs and Bitcoinjs
// You must have node and npm downloaded on your computer
// Download bitcoinjs library
npm install bitcoinjs-lib
// Require bitcoinjs-lib
var bitcoin = require("bitcoinjs-lib");
// Make variable for keyPair
var keyPair = bitcoin.ECPair.makeRandom();
@subfuzion
subfuzion / curl.md
Last active May 1, 2024 18:04
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@debashisbarman
debashisbarman / README.md
Last active February 15, 2024 02:19
A boilerplate Twitter bot that can retweet in response to the tweets matching particluar keyword (https://goo.gl/4whEIt)

Creating a Twitter bot with Node.js

Learn how you can create your own Twitter bot using Node.js and the new Twitter API. The bot will auto retweet in response to tweets with some particular hashtags. (https://goo.gl/4whEIt)

Tools we need

Here are the tools we’ll be using to create the bot — 

  • Node.js installed in your machine
  • A registered Twitter account

Create a Twitter application

@mrbobbybryant
mrbobbybryant / gist:83c4a076da6dd67de3da
Created November 19, 2014 20:30
Properly enqueue bootstrap into WordPress
<?php
/**
* Enqueue scripts and styles
*/
function your_theme_enqueue_scripts() {
// all styles
wp_enqueue_style( 'bootstrap', get_stylesheet_directory_uri() . '/css/bootstrap.css', array(), 20141119 );
wp_enqueue_style( 'theme-style', get_stylesheet_directory_uri() . '/css/style.css', array(), 20141119 );
// all scripts
wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '20120206', true );
@IzumiSy
IzumiSy / manifest.json
Last active November 6, 2022 20:29
Chrome.storage.sync example
{
"name": "SyncExtension",
"version": "0.1",
"manifest_version": 2,
"description": "Storage Sync Extension",
"permissions": [ "storage" ],
"browser_action": {
@nvk
nvk / readme
Created April 19, 2012 18:20
Using Git with Dropbox
### Instructions source http://tumblr.intranation.com/post/766290743/using-dropbox-git-repository ####
-- make empty repo on dropbox:
cd ~/Dropbox/RipeApps/Git
mkdir -p newname.git
cd !$
git --bare init
-- push your junk into it
cd ~/Projects/myrepo
@aheckmann
aheckmann / storeImgInMongoWithMongoose.js
Created April 17, 2012 19:14
store/display an image in mongodb using mongoose/express
/**
* Module dependencies
*/
var express = require('express');
var fs = require('fs');
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
// img path
@jfensign
jfensign / index.js
Created April 9, 2012 00:24
NodeJS User Registration and Authentication
//index.js
var express = require('express'),
app = module.exports = express.createServer(),
mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/nodeAuth');
//configure app
app.configure(function() {
app.set('views', __dirname + '/views');
@lancejpollard
lancejpollard / node-folder-structure-options.md
Created November 28, 2011 01:50
What is your folder-structure preference for a large-scale Node.js project?

What is your folder-structure preference for a large-scale Node.js project?

0: Starting from Rails

This is the reference point. All the other options are based off this.

|-- app
|   |-- controllers
|   |   |-- admin