Skip to content

Instantly share code, notes, and snippets.

View deadflowers's full-sized avatar
💭
Meh.

deadflowers deadflowers

💭
Meh.
View GitHub Profile
@maleeb
maleeb / fileservice.js
Last active October 16, 2016 01:03
AngularJS file service for ionic (org.apache.cordova.file)
//Filesystem (checkDir, createDir, checkFile, creatFile, removeFile, writeFile, readeFile)
.factory('FileService', function($q) {
return {
checkDir: function (dir) {
var deferred = $q.defer();
getFilesystem().then(
function(filesystem) {
filesystem.root.getDirectory(dir, {create: false},
@noromanba
noromanba / crx-download.mkd
Last active November 27, 2023 03:46
download and locate Chrome Extension file 'crx'

Inspect crx location on Chrome Web Store

crx are src-file of Chrome Extension, those name like this;

novell-moonlight-3.99.0.3-i586.crx

find out *.crx URL and download

Bookmarklet

for Google Web Store

anonymous
anonymous / not-responsive.html
Created October 25, 2012 21:10
These would be responsive in grids
<div class='yui3-g'>
<div class="yui3-u-1-3">...</div>
<div class="yui3-u-1-3">...</div>
<div class="yui3-u-1-3">...</div>
</div>
@forcementor
forcementor / PocketCRMController.Query()
Created October 22, 2012 00:43
Developing Mobile…Force.com and Sencha-Part 3, Step 2: Refactored Query() on Apex controller
@RemoteAction
public static Response Query(QueryRequest qr) {
Response resp = new Response();
//Enforce a limit on the number of rows requested.
final integer QUERY_LIMIT = 500;
if (qr.start >= QUERY_LIMIT) {
resp.success = false;
resp.errorMessage = 'Maximum number of records (' + String.valueOf(QUERY_LIMIT) + ') exceeded!';
@forcementor
forcementor / PocketCRMController.getAllLeads()
Created October 22, 2012 00:36
Developing Mobile…Force.com and Sencha-Part 3, Step 2: Lookback at getAllLeads() on Apex controller
private static List < Lead > getAllLeads() {
return [SELECT
FirstName, LastName, Company, Title, Phone, MobilePhone, Email, Status
FROM Lead LIMIT 50];
}
@dz0ny
dz0ny / 99java
Created July 7, 2012 10:23
Install java,flash,mp3,mp4 to Chromium OS
## Setup java
if [ `uname -m` == 'x86_64' ]; then
PATH="/usr/lib64/jvm/java-7-oracle/jre/bin/"
JAVA_HOME="/usr/lib64/jvm/java-7-oracle/"
else
PATH="/usr/lib/jvm/java-7-oracle/jre/bin/"
JAVA_HOME="/usr/lib/jvm/java-7-oracle/"
fi
@btoone
btoone / curl.md
Last active December 8, 2024 05:16
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API.

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@mbostock
mbostock / .block
Last active March 5, 2019 23:09
Zoomable Icicle
license: gpl-3.0
redirect: https://observablehq.com/@d3/zoomable-icicle
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active April 14, 2025 11:07
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh