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 | |
// Open the binary file | |
$filename = 'file.riv'; | |
$file = fopen($filename, 'rb'); | |
if (!$file) { | |
exit(); // Exit if file cannot be opened | |
} | |
// Read the first 4 bytes and check if it's 'RIVE' | |
$byte = fread($file, 4); | |
if ($byte !== 'RIVE') { |
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
#!/usr/bin/env bash | |
# Backup usage | |
# | |
# ./docker-db-export.sh backup my-project-folder-name_db_1 | |
# | |
# output to : ./my-project-folder-name_db_1.sql | |
# Restore usage | |
# |
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
import React from 'react' | |
import moment from 'moment' | |
import axios from 'axios' | |
const intervalDelay = 5000 | |
class BuildDebug extends React.Component { | |
constructor(props) { | |
super(props) |
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
'use strict'; | |
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var del = require('del'); | |
var uglify = require('gulp-uglify'); | |
var gulpif = require('gulp-if'); | |
var exec = require('child_process').exec; | |
var notify = require('gulp-notify'); |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
<div data-embeded-3d-object='<iframe width="100%" height="480" frameborder="0" allowFullScreen webkitallowfullscreen mozallowfullscreen src="//sketchfab.com/models/cc615fcd8fd04354b370e2107a3ee7bf/embed"></iframe>'> | |
<img src="fallback.jpg"> | |
</div> | |
<script> | |
// insert 3d object for supported browser only | |
if (Modernizr.webgl) { | |
$("[data-embeded-3d-object]").each(function() { | |
var html = $(this).data("embeded-3d-object"); | |
$(this).html(html) |
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
# twitter-autofollow.rb | |
# 2010-04-01 Antoine Girard <[email protected]> | |
# This script will search all you follower and add them as a friend | |
# Also post any privately received message to your public timeline. | |
require 'rubygems' | |
require 'twitter' | |
class AutoFollow |
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
=== Epic Snow Leopard Upgrayyyyd Guide === | |
Son, you’re now living in the land of 64-bit systems. | |
That means that some of your 32-bit shit is now broken. | |
Not all is lost. | |
== Fixing MySQL weirdness |