Skip to content

Instantly share code, notes, and snippets.

@dominikzogg
dominikzogg / ics.class.php
Created January 8, 2012 14:25
Ics class for php
<?php
/**
*
* Distributed under the GNU Lesser General Public License (LGPL v3)
* (http://www.gnu.org/licenses/lgpl.html)
* This program is distributed in the hope that it will be useful -
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
@roryhardy
roryhardy / README.md
Last active April 19, 2016 17:59
Multi-lined version of my oh-my-zsh theme.

gg2.zsh-theme

A ZSH theme for those who like the robbyrussell theme, but want the familiar $ and would like their prompt on a separate line from the typing space. For example, if you use git and have large branch names you could have path$ git:(this-is-a-very-very-very-very-very-long-branch-name) which eats up most of a small terminal window.

NOTE: Though this theme looks okay with most fonts, you will need to install a Powerline-patched font for this theme to render correctly.

Screenshot

pragma solidity ^0.4.0;
contract myico {
address public admin;
mapping(address => uint) balance;
uint public initial_supply = 1000000;
string public tokenName = "ICO";
function myico() public{
admin = msg.sender;
@yotavm
yotavm / Quovo.js
Last active August 15, 2018 18:50
Quovo class
import request from 'superagent';
const BASE_URL = 'https://api.quovo.com/v2';
const API_KEY = parameters.QUOVO_API_KEY;
const WEBHOOK_SECRET = parameters.QUOVO_WEBHOOK_SECRET;
const sendPRequest = async (method, path, payload) => {
try {
const newRequest = await request[method](`${BASE_URL}/${path}`)
.type('json')
@markupboy
markupboy / html5video.sh
Created February 8, 2011 15:43
automated conversion of a file to all three html5 compatible video formats - h.264, ogg, and webm
#!/bin/sh
####################################
# Output file for HTML5 video #
# Requirements: #
# - handbrakecli #
# - ffmpeg #
# - ffmpeg2theora #
# #
# usage: #
@RickWong
RickWong / react.html
Last active April 20, 2021 15:48
Write React apps in 1 HTML file.
<html>
<body>
<div id="react-root"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.1.0/react-with-addons.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.1.0/react-dom.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/redux/3.5.2/redux.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.7.7/babel.min.js"></script>
<script id="react-app" type="text/template">
const App = ({name}) => {
@juanpasolano
juanpasolano / api models Locations.js
Created September 9, 2014 21:50
seed database on sails js
/**
* Locations.js
*
* @description :: TODO: You might write a short summary of how this model works and what it represents here.
* @docs :: http://sailsjs.org/#!documentation/models
*/
module.exports = {
seedData:[
@ndbroadbent
ndbroadbent / gist:7575592
Last active September 19, 2022 08:13
SCM Breeze git aliases
GFORCE => git add -A && git commit --amend -C HEAD && git push -f
c => git_index
cbg => git rev-parse --verify HEAD | simple_clipboard
g => git
ga => git_add_shortcuts
gaa => git add -A
gap => git add -p
gash => git stash
gasha => git stash apply
gashl => git stash list
@nepsilon
nepsilon / postgres-import-export-csv.md
Last active September 23, 2022 14:57
Importing and Exporting CSV files with PostgreSQL — First published in fullweb.io issue #19

Importing and exporting CSV files with PostgreSQL

Let’s see how to use PostgreSQL to import and export CSV files painlessly with the COPY command.

Import CSV into table t_words:

COPY t_words FROM '/path/to/file.csv' DELIMITER ',' CSV;

You can tell quote char with QUOTE and change delimiter with DELIMITER.

@chesterbr
chesterbr / hello.asm
Last active August 10, 2023 07:57
An Atari 2600 "Hello, World!" program(it indeed prints "HELLO WORLD" vertically, twice)
;
; hello.asm
;
; A "Hello, World!" which illustrates an Atari 2600 programming
; introduction talk (slides at http://slideshare.net/chesterbr).
;
; This is free software (see license below). Build it with DASM
; (http://dasm-dillon.sourceforge.net/), by running:
;
; dasm hello.asm -ohello.bin -f3