Skip to content

Instantly share code, notes, and snippets.

@sdhzdmzzl
sdhzdmzzl / bj-unicom-iptv.m3u
Last active April 23, 2024 07:10
北京联通iptv列表
#EXTM3U name="bj-unicom-iptv"
#EXTINF:-1,CCTV1
rtp://239.3.1.1:8000
#EXTINF:-1,CCTV2
rtp://239.3.1.2:8004
#EXTINF:-1,CCTV4
rtp://239.3.1.4:8216
#EXTINF:-1,CCTV7
rtp://239.3.1.7:8024
#EXTINF:-1,CCTV9
@davidbradway
davidbradway / setup.md
Last active May 19, 2020 22:00
Set Up Docker On Raspberry Pi Raspbian Stretch Lite
@ssalonen
ssalonen / OpenWrt SSH tunnel.md
Last active February 13, 2024 21:29
OpenWrt SSH tunnel

Short how-to for creating a reverse ssh tunnel to a remote server. Useful for breaking NATted connection for example.

  1. At OpenWrt:
opkg update
opkg install sshtunnel
  1. At remote server: create client ssh keys
@JacobLett
JacobLett / gist:914c7b6a893def32ed8dfc8769254c95
Created September 27, 2016 13:16
defer after jquery loaded - jquery code before jquery is loaded
<script>
if ( ! window.deferAfterjQueryLoaded ) {
window.deferAfterjQueryLoaded = [];
Object.defineProperty(window, "$", {
set: function(value) {
window.setTimeout(function() {
$.each(window.deferAfterjQueryLoaded, function(index, fn) {
fn();
});
}, 0);
@gunjanpatel
gunjanpatel / revert-a-commit.md
Last active May 7, 2024 22:00
Git HowTo: revert a commit already pushed to a remote repository

Revert the full commit

Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.

git revert {commit_id}

About History Rewriting

Delete the last commit

Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:

@andyshinn
andyshinn / composer.json
Last active February 18, 2024 12:05
Docker Compose PHP Composer Example
{
"require": {
"mfacenet/hello-world": "v1.*"
}
}
@hollodotme
hollodotme / Install-php7.md
Last active August 11, 2022 06:23
Installing php7-fpm with phpredis and xdebug extension on Ubuntu 14.04

Install php7.0-fpm

# remove php5 modules
apt-get autoremove --purge php5-*
# add php-7.0 source list by [Ondřej Surý](https://github.com/oerdnj)
add-apt-repository ppa:ondrej/php
# Update index
apt-get update
# Install php7.0-fpm with needed extensions
@guoxiangke
guoxiangke / views_agax
Last active October 23, 2015 09:08
drupal views Ajax get views update
<div id="views">views!!!begin!!!
<?php
print views_embed_view('foodbanks', 'block', $state);
?>
<a href="##" id= "freash" >freash!!!</a>
<script type="text/javascript">
(function($) {
function getInfo(args) {
$.ajax({
@facine
facine / __INDEX.txt
Last active August 6, 2023 15:33
Drupal 8 - Examples
# Taxonomy terms:
- https://gist.github.com/facine/35bb291811c146b6fc9e#file-create_taxonomy_term-php
# Menu links:
- https://gist.github.com/facine/35bb291811c146b6fc9e#file-create_menu_link-php
# File items:
- https://gist.github.com/facine/35bb291811c146b6fc9e#file-create_file-php
# Nodes:
@jimothyGator
jimothyGator / README.md
Last active April 25, 2024 18:00
Nginx configuration for Mac OS X with Homebrew, using sites-enabled directory.
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf

File locations:

  • nginx.conf to /usr/local/etc/nginx/
  • default.conf and default-ssl.conf to /usr/local/etc/nginx/sites-available
  • homebrew.mxcl.nginx.plist to /Library/LaunchDaemons/